public function testContainerShouldAggregateReturnValuesFromPluginResources() { $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'); set_error_handler(array($this, 'handleError'), E_WARNING); $bootstrap->bootstrap('baz'); restore_error_handler(); $container = $bootstrap->getContainer(); $this->assertEquals('Baz', $container->baz->baz); }
public function testContainerShouldAggregateReturnValuesFromPluginResources() { $bootstrap = new TestAsset\ZfAppBootstrap($this->application); $bootstrap->getPluginLoader()->addPrefixPath('ZendTest\\Application\\TestAsset\\Resource', __DIR__ . '/TestAsset/resources'); $bootstrap->registerPluginResource('baz'); set_error_handler(array($this, 'handleError'), E_WARNING); $bootstrap->bootstrap('baz'); restore_error_handler(); $container = $bootstrap->getContainer(); $this->assertEquals('Baz', $container->baz->baz); }