mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[feature/extension-manager] Make the cache variable name for extensions dynamic
Allows multiple instances to use cache simultaneously. PHPBB3-10323
This commit is contained in:
@@ -125,7 +125,7 @@ class phpbb_extension_finder_test extends phpbb_test_case
|
||||
public function test_get_classes_create_cache()
|
||||
{
|
||||
$cache = new phpbb_mock_cache;
|
||||
$finder = new phpbb_extension_finder($this->extension_manager, dirname(__FILE__) . '/includes/', $cache);
|
||||
$finder = new phpbb_extension_finder($this->extension_manager, dirname(__FILE__) . '/includes/', $cache, '.php', '_custom_cache_name');
|
||||
$files = $finder->suffix('_class.php')->get_files();
|
||||
|
||||
sort($files);
|
||||
@@ -147,7 +147,7 @@ class phpbb_extension_finder_test extends phpbb_test_case
|
||||
);
|
||||
|
||||
$this->assertEquals($expected_files, $files);
|
||||
$cache->checkAssociativeVar($this, '_extension_finder', array(
|
||||
$cache->checkAssociativeVar($this, '_custom_cache_name', array(
|
||||
md5(serialize($query)) => $expected_files,
|
||||
));
|
||||
}
|
||||
@@ -165,7 +165,7 @@ class phpbb_extension_finder_test extends phpbb_test_case
|
||||
);
|
||||
|
||||
$finder = new phpbb_extension_finder($this->extension_manager, dirname(__FILE__) . '/includes/', new phpbb_mock_cache(array(
|
||||
'_extension_finder' => array(
|
||||
'_ext_finder' => array(
|
||||
md5(serialize($query)) => array('file_name'),
|
||||
),
|
||||
)));
|
||||
|
Reference in New Issue
Block a user