aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_framework/phpbb_functional_test_case.php
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2013-02-23 14:08:48 -0500
committerDavid King <imkingdavid@gmail.com>2013-02-23 14:08:48 -0500
commit6e1e62a77daf77ec3dd4fc131ffbb1a099936ef4 (patch)
treec04b110fb4fc900237665ca0c0ec8904b80f4d82 /tests/test_framework/phpbb_functional_test_case.php
parent0987efa18980c2cf8deb1fcb13baa1a43ae6035b (diff)
parent872773a21897ccad754a53d7c8ad7899bcc05796 (diff)
downloadforums-6e1e62a77daf77ec3dd4fc131ffbb1a099936ef4.tar
forums-6e1e62a77daf77ec3dd4fc131ffbb1a099936ef4.tar.gz
forums-6e1e62a77daf77ec3dd4fc131ffbb1a099936ef4.tar.bz2
forums-6e1e62a77daf77ec3dd4fc131ffbb1a099936ef4.tar.xz
forums-6e1e62a77daf77ec3dd4fc131ffbb1a099936ef4.zip
Merge remote-tracking branch 'EXreaction/feature/migrations-extensions' into develop
# By Nathaniel Guse (6) and Nathan Guse (3) # Via Nathan Guse (1) and Nathaniel Guse (1) * EXreaction/feature/migrations-extensions: [feature/migrations] Use getLocalisedMessage() function to get error message [feature/migrations] Fix failing tests (again) [feature/migrations] Fix failing tests [feature/migrations] Catch and display errors from the migrator [feature/migrations] Call revert correctly when purging an extension [feature/migrations] Inject Migrator instead of using the container to fetch [feature/migrations] Fix path to extension migrations [feature/migrations] Automatically install/revert migrations for extensions [feature/migrations] Make the container available to extension installers
Diffstat (limited to 'tests/test_framework/phpbb_functional_test_case.php')
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php27
1 files changed, 14 insertions, 13 deletions
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index e346223a4b..b570b464e6 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -134,19 +134,20 @@ class phpbb_functional_test_case extends phpbb_test_case
{
global $phpbb_root_path, $phpEx;
- if (!$this->extension_manager)
- {
- $this->extension_manager = new phpbb_extension_manager(
- $this->get_db(),
- new phpbb_config(array()),
- self::$config['table_prefix'] . 'ext',
- $phpbb_root_path,
- ".$phpEx",
- $this->get_cache_driver()
- );
- }
-
- return $this->extension_manager;
+ $config = new phpbb_config(array());
+ $db = $this->get_db();
+ $db_tools = new phpbb_db_tools($db);
+
+ return new phpbb_extension_manager(
+ new phpbb_mock_container_builder(),
+ $db,
+ $config,
+ new phpbb_db_migrator($config, $db, $db_tools, self::$config['table_prefix'] . 'migrations', $phpbb_root_path, $php_ext, self::$config['table_prefix'], array()),
+ self::$config['table_prefix'] . 'ext',
+ dirname(__FILE__) . '/',
+ '.' . $php_ext,
+ $this->get_cache_driver()
+ );
}
static protected function install_board()