Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

added a submodule loading to testCanLoadMultipleModules #5748

Merged
merged 1 commit into from

2 participants

@BreiteSeite

I added a test-assertion in testCanLoadMultipleModules for loading namespaced modules (modules with a slash in their name). Although testCanLoadSomeObjectModule already loads a submodule, this test does it without using the ModuleObjects.

@weierophinney weierophinney added this to the 2.3.0 milestone
@weierophinney weierophinney merged commit 4790e95 into from
@BreiteSeite BreiteSeite deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 tests/ZendTest/ModuleManager/ModuleManagerTest.php
View
4 tests/ZendTest/ModuleManager/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);
Something went wrong with that request. Please try again.