/** * @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); }
/** * @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); }