/** * @group ZF-7367 */ public function testPassingReturnResponseFlagShouldAlterFrontControllerStatus() { $resource = new FrontControllerResource(array('returnresponse' => true)); $resource->init(); $front = $resource->getFrontController(); $this->assertTrue($front->returnResponse()); }
/** * @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); }