/** * @group ZF-6543 * @group disable */ public function testPluginClassesDefiningExplicitTypeWillBeRegisteredWithThatValue() { $this->application->setOptions(array('resources' => array('ZendTest\\Application\\Layout' => array(), 'layout' => array()))); set_error_handler(array($this, 'handleError')); $bootstrap = new Application\Bootstrap($this->application); $bootstrap->bootstrap('BootstrapAbstractTestLayout'); $resource1 = $bootstrap->getResource('BootstrapAbstractTestLayout'); $bootstrap->bootstrap('layout'); $resource2 = $bootstrap->getResource('layout'); $this->assertNotSame($resource1, $resource2); $this->assertTrue($resource1 instanceof Layout, var_export(array_keys($bootstrap->getBroker()->getRegisteredPlugins()), 1)); $this->assertTrue($resource2 instanceof \Zend\Layout\Layout); restore_error_handler(); }
public function testFrontControllerSpecShouldNotBeOverwrittenByBootstrap() { $application = new Application\Application('testing', array('resources' => array('frontcontroller' => array('controllerDirectory' => __DIR__ . '/TestAsset/modules/application/controllers', 'moduleDirectory' => __DIR__ . '/TestAsset/modules'), 'modules' => array()))); $bootstrap = new Application\Bootstrap($application); $bootstrap->bootstrap(); $front = $bootstrap->getResource('frontcontroller'); $module = $front->getDefaultModule(); $dir = $front->getControllerDirectory($module); $this->assertNotNull($dir); }