예제 #1
0
 public function testInitializationPushesFrontControllerToBootstrapWhenPresent()
 {
     $resource = new FrontControllerResource(array());
     $resource->setBootstrap($this->bootstrap);
     $resource->init();
     $this->assertSame($resource->getFrontController(), $this->bootstrap->frontController);
 }
예제 #2
0
 /**
  * @group ZF-6803
  * @group ZF-7158
  */
 public function testShouldReturnExecutedBootstrapsWhenComplete()
 {
     $resource = new FrontControllerResource(array('moduleDirectory' => __DIR__ . '/../TestAsset/modules'));
     $resource->setBootstrap($this->bootstrap);
     $resource->init();
     $resource = new ModulesResource(array());
     $resource->setBootstrap($this->bootstrap);
     $bootstraps = $resource->init();
     $this->assertEquals(6, count((array) $bootstraps));
     $this->assertArrayHasKey('bar', (array) $bootstraps);
     $this->assertArrayHasKey('foo-bar', (array) $bootstraps);
     $this->assertArrayHasKey('foo', (array) $bootstraps);
     $this->assertArrayHasKey('application', (array) $bootstraps);
     $this->assertArrayHasKey('zf2-30-module1', (array) $bootstraps);
     $this->assertArrayHasKey('zf2-30-module2', (array) $bootstraps);
 }