From 7ee22d0288a7e056305764e447d1b4f20011616e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20K=C3=BChn?= Date: Tue, 14 Jan 2014 10:41:48 +0100 Subject: [PATCH] added a submodule loading to testCanLoadMultipleModules --- test/ModuleManagerTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/ModuleManagerTest.php b/test/ModuleManagerTest.php index d8e603f..08e253c 100644 --- a/test/ModuleManagerTest.php +++ b/test/ModuleManagerTest.php @@ -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);