public function testPluginResourcesShouldBeAvailableFollowingBootstrapping()
 {
     $bootstrap = new TestAsset\ZfAppBootstrap($this->application);
     $broker = $bootstrap->getBroker();
     require_once __DIR__ . '/TestAsset/resources/Baz.php';
     $broker->getClassLoader()->registerPlugin('baz', 'ZendTest\\Application\\TestAsset\\Resource\\Baz');
     $broker->registerSpec('baz');
     $bootstrap->bootstrap('baz');
     $this->assertTrue($bootstrap->hasResource('baz'));
     $resource = $bootstrap->getResource('baz');
     $this->assertEquals('Baz', $resource->baz);
 }
Ejemplo n.º 2
0
 public function testPluginResourcesShouldBeAvailableFollowingBootstrapping()
 {
     $bootstrap = new TestAsset\ZfAppBootstrap($this->application);
     $bootstrap->getPluginLoader()->addPrefixPath('ZendTest\\Application\\TestAsset\\Resource', __DIR__ . '/TestAsset/resources');
     $bootstrap->registerPluginResource('baz');
     $bootstrap->bootstrap('baz');
     $this->assertTrue($bootstrap->hasResource('baz'));
     $resource = $bootstrap->getResource('baz');
     $this->assertEquals('Baz', $resource->baz);
 }