Permalink
Browse files

Removed remains of old Zend test folder.

  • Loading branch information...
1 parent 0cf04b3 commit 03145847f1646d956e99034418aab914dffba54c @coss coss committed Sep 13, 2012
@@ -1,15 +0,0 @@
-<?php
-/**
- * Zend Framework (http://framework.zend.com/)
- *
- * @link http://github.com/zendframework/zf2 for the canonical source repository
- * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license http://framework.zend.com/license/new-bsd New BSD License
- * @package Zend_Loader
- */
-
-namespace BarModule;
-
-class Module
-{
-}
Binary file not shown.
@@ -1,96 +0,0 @@
-<?php
-/**
- * Zend Framework (http://framework.zend.com/)
- *
- * @link http://github.com/zendframework/zf2 for the canonical source repository
- * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license http://framework.zend.com/license/new-bsd New BSD License
- * @package Zend_ModuleManager
- */
-
-namespace ZendTest\ModuleManager\Listener;
-
-use ArrayObject;
-use InvalidArgumentException;
-use PHPUnit_Framework_TestCase as TestCase;
-use Zend\ModuleManager\Listener\ModuleResolverListener;
-use Zend\ModuleManager\Listener\ModuleLoaderListener;
-use Zend\ModuleManager\Listener\ListenerOptions;
-use Zend\ModuleManager\ModuleManager;
-use Zend\ModuleManager\ModuleEvent;
-
-class ModuleLoaderListenerTest extends TestCase
-{
- public function setUp()
- {
- $this->tmpdir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'zend_module_cache_dir';
- @mkdir($this->tmpdir);
-
- $this->moduleManager = new ModuleManager(array());
- $this->moduleManager->getEventManager()->attach('loadModule.resolve', new ModuleResolverListener, 1000);
- }
-
- public function tearDown()
- {
- $file = glob($this->tmpdir . DIRECTORY_SEPARATOR . '*');
- @unlink($file[0]); // change this if there's ever > 1 file
- @rmdir($this->tmpdir);
- }
-
- public function testModuleLoaderListenerFunctionsAsAggregateListenerEnabledCache()
- {
- $options = new ListenerOptions(array(
- 'cache_dir' => $this->tmpdir,
- 'module_map_cache_enabled' => true,
- 'module_map_cache_key' => 'foo',
- ));
-
- $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)));
-
- $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)));
- }
-
- public function testModuleLoaderListenerFunctionsAsAggregateListenerDisabledCache()
- {
- $options = new ListenerOptions(array(
- 'cache_dir' => $this->tmpdir,
- ));
-
- $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)));
-
- $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)));
- }
-
- public function testModuleLoaderListenerFunctionsAsAggregateListenerHasCache()
- {
- $options = new ListenerOptions(array(
- 'cache_dir' => $this->tmpdir,
- 'module_map_cache_key' => 'foo',
- 'module_map_cache_enabled' => true,
- ));
-
- file_put_contents($options->getModuleMapCacheFile(), '<?php return array();');
-
- $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)));
-
- $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)));
- }
-}

0 comments on commit 0314584

Please sign in to comment.