aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-04-23 20:41:37 +0200
committerMarc Alexander <admin@m-a-styles.de>2019-04-24 21:05:55 +0200
commit58f33921b56c3524e5c2b2c15bbf0dddea1ff461 (patch)
tree1c40992552dd05a108cf334bcb6eb4ef6fd61cf7
parent2b0645b7b9030ce5101f3a3aa4c10ed446527dc8 (diff)
downloadforums-58f33921b56c3524e5c2b2c15bbf0dddea1ff461.tar
forums-58f33921b56c3524e5c2b2c15bbf0dddea1ff461.tar.gz
forums-58f33921b56c3524e5c2b2c15bbf0dddea1ff461.tar.bz2
forums-58f33921b56c3524e5c2b2c15bbf0dddea1ff461.tar.xz
forums-58f33921b56c3524e5c2b2c15bbf0dddea1ff461.zip
[ticket/16027] Force clearing of cache folder on install for functional
PHPBB3-16027
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index d4856f954a..4d294fd523 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -397,6 +397,14 @@ class phpbb_functional_test_case extends phpbb_test_case
global $phpbb_container;
$phpbb_container->reset();
+ // Purge cache to remove cached files
+ $phpbb_container = new phpbb_mock_container_builder();
+ $phpbb_container->setParameter('core.environment', PHPBB_ENVIRONMENT);
+ $phpbb_container->setParameter('core.cache_dir', $phpbb_root_path . 'cache/' . PHPBB_ENVIRONMENT . '/');
+
+ $cache = new \phpbb\cache\driver\file;
+ $cache->purge();
+
$blacklist = ['phpbb_class_loader_mock', 'phpbb_class_loader_ext', 'phpbb_class_loader'];
foreach (array_keys($GLOBALS) as $key)