diff options
author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2016-03-24 13:01:52 +0100 |
---|---|---|
committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2016-04-03 16:23:16 +0200 |
commit | 6d2acb5ba3fbd22b345b312e704021eab1375941 (patch) | |
tree | 7528537863a334bfe4e1c559216d1054f1c634e7 /tests/test_framework/phpbb_ui_test_case.php | |
parent | bffd963c5033cfa49c016b7c4f163bf58d065e2b (diff) | |
download | forums-6d2acb5ba3fbd22b345b312e704021eab1375941.tar forums-6d2acb5ba3fbd22b345b312e704021eab1375941.tar.gz forums-6d2acb5ba3fbd22b345b312e704021eab1375941.tar.bz2 forums-6d2acb5ba3fbd22b345b312e704021eab1375941.tar.xz forums-6d2acb5ba3fbd22b345b312e704021eab1375941.zip |
[ticket/13616] Fix UI tests
PHPBB3-13616
Diffstat (limited to 'tests/test_framework/phpbb_ui_test_case.php')
-rw-r--r-- | tests/test_framework/phpbb_ui_test_case.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/test_framework/phpbb_ui_test_case.php b/tests/test_framework/phpbb_ui_test_case.php index b5ac3a576b..e79c78db29 100644 --- a/tests/test_framework/phpbb_ui_test_case.php +++ b/tests/test_framework/phpbb_ui_test_case.php @@ -256,9 +256,17 @@ class phpbb_ui_test_case extends phpbb_test_case @unlink($phpbb_root_path . 'cache/install_lock'); } - global $phpbb_container, $cache, $phpbb_dispatcher, $request, $user, $auth, $db, $config, $phpbb_log, $symfony_request, $phpbb_filesystem, $phpbb_path_helper, $phpbb_extension_manager, $template; + global $phpbb_container; $phpbb_container->reset(); - unset($phpbb_container, $cache, $phpbb_dispatcher, $request, $user, $auth, $db, $config, $phpbb_log, $symfony_request, $phpbb_filesystem, $phpbb_path_helper, $phpbb_extension_manager, $template); + + $blacklist = ['phpbb_class_loader_mock', 'phpbb_class_loader_ext', 'phpbb_class_loader']; + + foreach (array_keys($GLOBALS) as $key) { + if (is_object($GLOBALS[$key]) && !in_array($key, $blacklist, true)) + { + unset($GLOBALS[$key]); + } + } } static protected function get_db() |