Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge pull request zendframework/zendframework#2 from zendframework/m…
Browse files Browse the repository at this point in the history
…aster

Back port from zf2/master
  • Loading branch information
leogr committed Mar 4, 2014
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/ModuleManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,16 @@ public function testCanLoadSomeModule()
public function testCanLoadMultipleModules()
{
$configListener = $this->defaultListeners->getConfigListener();
$moduleManager = new ModuleManager(array('BarModule', 'BazModule'));
$moduleManager = new ModuleManager(array('BarModule', 'BazModule', 'SubModule\Sub'));
$moduleManager->getEventManager()->attachAggregate($this->defaultListeners);
$moduleManager->loadModules();
$loadedModules = $moduleManager->getLoadedModules();
$this->assertInstanceOf('BarModule\Module', $loadedModules['BarModule']);
$this->assertInstanceOf('BazModule\Module', $loadedModules['BazModule']);
$this->assertInstanceOf('SubModule\Sub\Module', $loadedModules['SubModule\Sub']);
$this->assertInstanceOf('BarModule\Module', $moduleManager->getModule('BarModule'));
$this->assertInstanceOf('BazModule\Module', $moduleManager->getModule('BazModule'));
$this->assertInstanceOf('SubModule\Sub\Module', $moduleManager->getModule('SubModule\Sub'));
$this->assertNull($moduleManager->getModule('NotLoaded'));
$config = $configListener->getMergedConfig();
$this->assertSame('foo', $config->bar);
Expand Down

0 comments on commit 24a8854

Please sign in to comment.