示例#1
0
 protected function _formatModuleName($name)
 {
     if ($name == 'default') {
         $name = 'application';
     }
     return parent::_formatModuleName($name);
 }
示例#2
0
 protected function bootstrapBootstraps($bootstraps)
 {
     array_pop($bootstraps);
     return parent::bootstrapBootstraps($bootstraps);
 }
示例#3
0
    /**
     * @group ZF-6803
     * @group ZF-7158
     */
    public function testShouldReturnExecutedBootstrapsWhenComplete()
    {
        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);
        $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('default', (array)$bootstraps);
    }