From 4a2b12a0c8d7fc3761dde815ca3cfd5685c6a8c6 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Mon, 1 Oct 2018 13:56:37 -0700 Subject: [PATCH] [ticket/15824] Fix cache initialization in UI framework PHPBB3-15824 --- tests/test_framework/phpbb_ui_test_case.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_framework/phpbb_ui_test_case.php b/tests/test_framework/phpbb_ui_test_case.php index d38d14f45c..72d15ae0b0 100644 --- a/tests/test_framework/phpbb_ui_test_case.php +++ b/tests/test_framework/phpbb_ui_test_case.php @@ -338,6 +338,12 @@ class phpbb_ui_test_case extends phpbb_test_case { if (!$this->cache) { + global $phpbb_container, $phpbb_root_path; + + $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 . '/'); + $this->cache = new \phpbb\cache\driver\file; }