aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/dbal/migrator_test.php8
-rw-r--r--tests/extension/manager_test.php4
-rw-r--r--tests/extension/metadata_manager_test.php4
3 files changed, 11 insertions, 5 deletions
diff --git a/tests/dbal/migrator_test.php b/tests/dbal/migrator_test.php
index 10a9444d63..4c4306888c 100644
--- a/tests/dbal/migrator_test.php
+++ b/tests/dbal/migrator_test.php
@@ -46,7 +46,10 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
new \phpbb\db\migration\tool\config($this->config),
);
+ $container = new phpbb_mock_container_builder();
+
$this->migrator = new \phpbb\db\migrator(
+ $container,
$this->config,
$this->db,
$this->db_tools,
@@ -57,9 +60,8 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
$tools,
new \phpbb\db\migration\helper()
);
-
- $container = new phpbb_mock_container_builder();
- $container->set('migrator', $migrator);
+ $container->set('migrator', $this->migrator);
+ $container->set('dispatcher', new phpbb_mock_event_dispatcher());
$user = new \phpbb\user('\phpbb\datetime');
$this->extension_manager = new \phpbb\extension\manager(
diff --git a/tests/extension/manager_test.php b/tests/extension/manager_test.php
index 5c7cad89f6..0eeb060936 100644
--- a/tests/extension/manager_test.php
+++ b/tests/extension/manager_test.php
@@ -156,7 +156,10 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
$table_prefix = 'phpbb_';
$user = new \phpbb\user('\phpbb\user');
+ $container = new phpbb_mock_container_builder();
+
$migrator = new \phpbb\db\migrator(
+ $container,
$config,
$db,
$db_tools,
@@ -167,7 +170,6 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
array(),
new \phpbb\db\migration\helper()
);
- $container = new phpbb_mock_container_builder();
$container->set('migrator', $migrator);
return new \phpbb\extension\manager(
diff --git a/tests/extension/metadata_manager_test.php b/tests/extension/metadata_manager_test.php
index fab1d3af3a..2a746d3792 100644
--- a/tests/extension/metadata_manager_test.php
+++ b/tests/extension/metadata_manager_test.php
@@ -62,7 +62,10 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
new \phpbb\template\context()
);
+ $container = new phpbb_mock_container_builder();
+
$this->migrator = new \phpbb\db\migrator(
+ $container,
$this->config,
$this->db,
$this->db_tools,
@@ -73,7 +76,6 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
array(),
new \phpbb\db\migration\helper()
);
- $container = new phpbb_mock_container_builder();
$container->set('migrator', $this->migrator);
$this->extension_manager = new \phpbb\extension\manager(