Permalink
Browse files

Fixed error in the previous commit

  • Loading branch information...
1 parent 530017a commit 983101dda66e1c5f10ddbcc6c5ef10e0d9b7bb76 @coss coss committed Aug 2, 2012
@@ -106,7 +106,7 @@ protected function hasCachedClassMap()
{
if (
$this->options->getModuleMapCacheEnabled()
- && file_exists($this->options->getConfigCacheFile())
+ && file_exists($this->options->getModuleMapCacheFile())
) {
return true;
}
@@ -45,13 +45,13 @@ public function testModuleLoaderListenerFunctionsAsAggregateListenerEnabledCache
'module_map_cache_key' => 'foo',
));
- $configListener = new ModuleLoaderListener($options);
+ $moduleLoaderListener = new ModuleLoaderListener($options);
$moduleManager = $this->moduleManager;
$this->assertEquals(1, count($moduleManager->getEventManager()->getListeners(ModuleEvent::EVENT_LOAD_MODULES)));
$this->assertEquals(0, count($moduleManager->getEventManager()->getListeners(ModuleEvent::EVENT_LOAD_MODULES_POST)));
- $configListener->attach($moduleManager->getEventManager());
+ $moduleLoaderListener->attach($moduleManager->getEventManager());
$this->assertEquals(2, count($moduleManager->getEventManager()->getListeners(ModuleEvent::EVENT_LOAD_MODULES)));
$this->assertEquals(1, count($moduleManager->getEventManager()->getListeners(ModuleEvent::EVENT_LOAD_MODULES_POST)));
}
@@ -62,13 +62,13 @@ public function testModuleLoaderListenerFunctionsAsAggregateListenerDisabledCach
'cache_dir' => $this->tmpdir,
));
- $configListener = new ModuleLoaderListener($options);
+ $moduleLoaderListener = new ModuleLoaderListener($options);
$moduleManager = $this->moduleManager;
$this->assertEquals(1, count($moduleManager->getEventManager()->getListeners(ModuleEvent::EVENT_LOAD_MODULES)));
$this->assertEquals(0, count($moduleManager->getEventManager()->getListeners(ModuleEvent::EVENT_LOAD_MODULES_POST)));
- $configListener->attach($moduleManager->getEventManager());
+ $moduleLoaderListener->attach($moduleManager->getEventManager());
$this->assertEquals(2, count($moduleManager->getEventManager()->getListeners(ModuleEvent::EVENT_LOAD_MODULES)));
$this->assertEquals(0, count($moduleManager->getEventManager()->getListeners(ModuleEvent::EVENT_LOAD_MODULES_POST)));
}
@@ -77,20 +77,20 @@ public function testModuleLoaderListenerFunctionsAsAggregateListenerHasCache()
{
$options = new ListenerOptions(array(
'cache_dir' => $this->tmpdir,
- 'module_map_cache_enabled' => true,
'module_map_cache_key' => 'foo',
+ 'module_map_cache_enabled' => true,
));
file_put_contents($options->getModuleMapCacheFile(), '<?php return array();');
- $configListener = new ModuleLoaderListener($options);
+ $moduleLoaderListener = new ModuleLoaderListener($options);
$moduleManager = $this->moduleManager;
$this->assertEquals(1, count($moduleManager->getEventManager()->getListeners(ModuleEvent::EVENT_LOAD_MODULES)));
$this->assertEquals(0, count($moduleManager->getEventManager()->getListeners(ModuleEvent::EVENT_LOAD_MODULES_POST)));
- $configListener->attach($moduleManager->getEventManager());
+ $moduleLoaderListener->attach($moduleManager->getEventManager());
$this->assertEquals(2, count($moduleManager->getEventManager()->getListeners(ModuleEvent::EVENT_LOAD_MODULES)));
- $this->assertEquals(1, count($moduleManager->getEventManager()->getListeners(ModuleEvent::EVENT_LOAD_MODULES_POST)));
+ $this->assertEquals(0, count($moduleManager->getEventManager()->getListeners(ModuleEvent::EVENT_LOAD_MODULES_POST)));
}
}

0 comments on commit 983101d

Please sign in to comment.