Ejemplo n.º 1
0
 public function init()
 {
     $return = parent::init();
     if (empty($this->initTime)) {
         $this->initTime = \microtime(true);
     }
     return $return;
 }
Ejemplo n.º 2
0
 /**
  * @group ZF-6803
  * @group ZF-7158
  */
 public function testShouldReturnExecutedBootstrapsWhenComplete()
 {
     $this->bootstrap->registerPluginResource('Frontcontroller', array('moduleDirectory' => __DIR__ . '/../TestAsset/modules'));
     $resource = new ModulesResource(array());
     $resource->setBootstrap($this->bootstrap);
     $bootstraps = $resource->init();
     $this->assertEquals(4, count((array) $bootstraps));
     $this->assertArrayHasKey('bar', (array) $bootstraps);
     $this->assertArrayHasKey('foo-bar', (array) $bootstraps);
     $this->assertArrayHasKey('foo', (array) $bootstraps);
     $this->assertArrayHasKey('application', (array) $bootstraps);
 }