aboutsummaryrefslogtreecommitdiffstats
path: root/tests/extension
diff options
context:
space:
mode:
authorNathaniel Guse <nathaniel.guse@gmail.com>2013-03-03 19:54:22 -0600
committerNathaniel Guse <nathaniel.guse@gmail.com>2013-03-03 19:54:22 -0600
commite4f782819968ec44f1dd207dc9de7ec703826d29 (patch)
treee55e3aa115c561d0522b15c897a86a2de8d208ef /tests/extension
parentbee4f8d8185d4ff5278be758db4ea4a814f09b4f (diff)
downloadforums-e4f782819968ec44f1dd207dc9de7ec703826d29.tar
forums-e4f782819968ec44f1dd207dc9de7ec703826d29.tar.gz
forums-e4f782819968ec44f1dd207dc9de7ec703826d29.tar.bz2
forums-e4f782819968ec44f1dd207dc9de7ec703826d29.tar.xz
forums-e4f782819968ec44f1dd207dc9de7ec703826d29.zip
[ticket/11386] Send list of migrations instead of using load_migrations
Remove dependency of extension manager for migrator. Keeping load_migrations function for others to use if they desire but requiring the finder be sent to it in order to use it. PHPBB3-11386
Diffstat (limited to 'tests/extension')
-rw-r--r--tests/extension/manager_test.php23
-rw-r--r--tests/extension/metadata_manager_test.php11
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,