1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 02:36:38 +02:00

[ticket/16891] Update test files to work with changed cache service

PHPBB3-16891
This commit is contained in:
Marc Alexander
2022-01-28 21:58:32 +01:00
parent 9dc25510a1
commit 7992b3f476
15 changed files with 36 additions and 21 deletions

View File

@@ -155,6 +155,7 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
{
$config = new \phpbb\config\config(array('version' => PHPBB_VERSION));
$db = $this->new_dbal();
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
$factory = new \phpbb\db\tools\factory();
$db_tools = $factory->get($db);
$phpbb_root_path = __DIR__ . './../../phpBB/';
@@ -185,7 +186,7 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
'phpbb_ext',
__DIR__ . '/',
$php_ext,
($with_cache) ? new \phpbb\cache\service(new phpbb_mock_cache(), $config, $db, $phpbb_root_path, $php_ext) : null
($with_cache) ? new \phpbb\cache\service(new phpbb_mock_cache(), $config, $db, $phpbb_dispatcher, $phpbb_root_path, $php_ext) : null
);
}
}

View File

@@ -40,12 +40,13 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
'version' => '3.1.0',
));
$this->db = $this->new_dbal();
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
$factory = new \phpbb\db\tools\factory();
$this->db_tools = $factory->get($this->db);
$this->phpbb_root_path = __DIR__ . '/';
$this->phpEx = 'php';
$this->cache = new \phpbb\cache\service(new phpbb_mock_cache(), $this->config, $this->db, $this->phpbb_root_path, $this->phpEx);
$this->cache = new \phpbb\cache\service(new phpbb_mock_cache(), $this->config, $this->db, $phpbb_dispatcher, $this->phpbb_root_path, $this->phpEx);
$this->table_prefix = 'phpbb_';
@@ -70,7 +71,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
$cache_path,
null,
$loader,
new \phpbb\event\dispatcher($container),
$phpbb_dispatcher,
array(
'cache' => false,
'debug' => false,