Example #1
0
 /**
  * @group ZF-11548
  */
 public function testGetExecutedBootstrapsShouldReturnArrayObject()
 {
     require_once 'Zend/Application/Resource/Modules.php';
     $this->bootstrap->registerPluginResource('Frontcontroller', array('moduleDirectory' => dirname(__FILE__) . '/../_files/modules'));
     $resource = new Zend_Application_Resource_Modules(array());
     $resource->setBootstrap($this->bootstrap);
     $resource->init();
     $bootstraps = $resource->getExecutedBootstraps();
     $this->assertType('ArrayObject', $bootstraps);
 }
Example #2
0
    /**
     * @group ZF-6803
     * @group ZF-7158
     */
    public function testInitializationShouldSkipModulesWithoutBootstraps()
    {
        require_once 'Zend/Application/Resource/Modules.php';

        $this->bootstrap->registerPluginResource('Frontcontroller', array(
            'moduleDirectory' => dirname(__FILE__) . '/../_files/modules',
        ));
        $resource = new Zend_Application_Resource_Modules(array());
        $resource->setBootstrap($this->bootstrap);
        $resource->init();
        $bootstraps = $resource->getExecutedBootstraps();
        $this->assertEquals(4, count((array)$bootstraps));
        $this->assertArrayHasKey('bar',     (array)$bootstraps);
        $this->assertArrayHasKey('foo-bar', (array)$bootstraps);
        $this->assertArrayHasKey('foo',     (array)$bootstraps);
        $this->assertArrayHasKey('default', (array)$bootstraps);
    }