コード例 #1
0
ファイル: BootstrapTest.php プロジェクト: netvlies/zf
 /**
  * @group ZF-6545
  */
 public function testFrontControllerStateRemainsSameIfNoOptionsPassedToModuleBootstrap()
 {
     // require_once dirname(__FILE__) . '/../_files/ZfModuleBootstrap.php';
     $this->application->setOptions(array('resources' => array('frontController' => array('baseUrl' => '/foo', 'controllerDirectory' => dirname(__FILE__))), 'bootstrap' => array('path' => dirname(__FILE__) . '/../_files/ZfAppBootstrap.php', 'class' => 'ZfAppBootstrap'), 'ZfModule' => array('resources' => array('FrontController' => array()))));
     $appBootstrap = $this->application->getBootstrap();
     $appBootstrap->bootstrap('FrontController');
     $front = $appBootstrap->getResource('FrontController');
     $bootstrap = new ZfModule_Bootstrap($appBootstrap);
     $bootstrap->bootstrap('FrontController');
     $test = $bootstrap->getResource('FrontController');
     $this->assertSame($front, $test);
     $this->assertEquals('/foo', $test->getBaseUrl());
     $this->assertEquals(dirname(__FILE__), $test->getControllerDirectory('default'));
 }