diff options
Diffstat (limited to 'tests/extension')
-rw-r--r-- | tests/extension/manager_test.php | 23 | ||||
-rw-r--r-- | tests/extension/metadata_manager_test.php | 11 |
2 files changed, 21 insertions, 13 deletions
diff --git a/tests/extension/manager_test.php b/tests/extension/manager_test.php index 3b81afc456..1f311116f4 100644 --- a/tests/extension/manager_test.php +++ b/tests/extension/manager_test.php @@ -97,15 +97,6 @@ class phpbb_extension_manager_test extends phpbb_database_test_case $php_ext = 'php'; $table_prefix = 'phpbb_'; - $manager = new phpbb_extension_manager( - new phpbb_mock_container_builder(), - $db, - $config, - 'phpbb_ext', - dirname(__FILE__) . '/', - '.' . $php_ext, - ($with_cache) ? new phpbb_mock_cache() : null - ); $migrator = new phpbb_db_migrator( $config, $db, @@ -116,9 +107,15 @@ class phpbb_extension_manager_test extends phpbb_database_test_case $table_prefix, array() ); - $manager->set_migrator($migrator); - $migrator->set_extension_manager($manager); - - return $manager; + return new phpbb_extension_manager( + new phpbb_mock_container_builder(), + $db, + $config, + $migrator, + 'phpbb_ext', + dirname(__FILE__) . '/', + '.' . $php_ext, + ($with_cache) ? new phpbb_mock_cache() : null + ); } } diff --git a/tests/extension/metadata_manager_test.php b/tests/extension/metadata_manager_test.php index 7fb19b67e3..081a32e277 100644 --- a/tests/extension/metadata_manager_test.php +++ b/tests/extension/metadata_manager_test.php @@ -49,10 +49,21 @@ class metadata_manager_test extends phpbb_database_test_case new phpbb_template_context() ); + $this->migrator = new phpbb_db_migrator( + $this->config, + $this->db, + $this->db_tools, + 'phpbb_migrations', + $this->phpbb_root_path, + 'php', + $this->table_prefix, + array() + ); $this->extension_manager = new phpbb_extension_manager( new phpbb_mock_container_builder(), $this->db, $this->config, + $this->migrator, 'phpbb_ext', $this->phpbb_root_path, $this->phpEx, |