1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 08:47:45 +02:00

[task/acm-refactor] Cleaning up left over mentions of ACM and fixing tests.

PHPBB3-9983
This commit is contained in:
Nils Adermann
2011-01-09 21:09:56 +01:00
committed by Igor Wiedler
parent 9329b16ab1
commit 1aef7eb20e
13 changed files with 76 additions and 117 deletions

View File

@@ -2,13 +2,12 @@
/**
*
* @package testing
* @version $Id$
* @copyright (c) 2008 phpBB Group
* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
require_once __DIR__ . '/cache_mock.php';
require_once __DIR__ . '/../mock/cache.php';
class phpbb_class_loader_test extends PHPUnit_Framework_TestCase
{
@@ -62,15 +61,7 @@ class phpbb_class_loader_test extends PHPUnit_Framework_TestCase
public function test_resolve_cached()
{
$cacheMap = array('class_loader' => array('phpbb_a_cached_name' => 'a/cached_name'));
$cache = $this->getMock('phpbb_cache_driver_interface',
array('get', 'put', 'load', 'unload', 'save', 'tidy', 'purge', 'destroy', '_exists',
'sql_load', 'sql_save', 'sql_exists', 'sql_fetchrow', 'sql_fetchfield', 'sql_rowseek', 'sql_freeresult'));
$cache->expects($this->any())
->method('get')
->will($this->returnCallback(function($var_name) use ($cacheMap) {
return $cacheMap[$var_name];
}));
$cache = new phpbb_mock_cache($cacheMap);
$prefix = __DIR__ . '/';
$class_loader = new phpbb_class_loader($prefix, '.php', $cache);
@@ -88,5 +79,8 @@ class phpbb_class_loader_test extends PHPUnit_Framework_TestCase
$class_loader->resolve_path('phpbb_a_cached_name'),
'Class in a directory'
);
$cacheMap['class_loader']['phpbb_dir_class_name'] = 'dir/class_name';
$cache->check($this, $cacheMap);
}
}