mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-06 06:25:04 +02:00
[ticket/13616] Cleanup globals after installing the board in func tests
PHPBB3-13616
This commit is contained in:
parent
663e3bc642
commit
bffd963c50
@ -384,9 +384,17 @@ class phpbb_functional_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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function install_ext($extension)
|
||||
|
Loading…
x
Reference in New Issue
Block a user