diff options
author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-03-03 19:54:22 -0600 |
---|---|---|
committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-03-03 19:54:22 -0600 |
commit | e4f782819968ec44f1dd207dc9de7ec703826d29 (patch) | |
tree | e55e3aa115c561d0522b15c897a86a2de8d208ef /tests/extension | |
parent | bee4f8d8185d4ff5278be758db4ea4a814f09b4f (diff) | |
download | forums-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.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, |