From 179a4700221aa49071b07d638c44b9326c7a14a8 Mon Sep 17 00:00:00 2001 From: MateBartus Date: Tue, 14 Apr 2015 02:31:23 +0200 Subject: [ticket/13762] Moving language related functionality into a separate class PHPBB3-13762 --- tests/console/cache/purge_test.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/console/cache/purge_test.php') diff --git a/tests/console/cache/purge_test.php b/tests/console/cache/purge_test.php index 96988c1028..172fb0ecf3 100644 --- a/tests/console/cache/purge_test.php +++ b/tests/console/cache/purge_test.php @@ -32,6 +32,8 @@ class phpbb_console_command_cache_purge_test extends phpbb_test_case protected function setUp() { + global $phpbb_root_path, $phpEx; + if (file_exists($this->cache_dir)) { // cache directory possibly left after aborted @@ -45,7 +47,10 @@ class phpbb_console_command_cache_purge_test extends phpbb_test_case $this->db = $this->getMock('\phpbb\db\driver\driver_interface'); $this->config = new \phpbb\config\config(array('assets_version' => 1)); - $this->user = $this->getMock('\phpbb\user', array(), array('\phpbb\datetime')); + $this->user = $this->getMock('\phpbb\user', array(), array( + new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)), + '\phpbb\datetime') + ); } public function test_purge() -- cgit v1.2.1 From 232f71dae43df9794184961431aca81d0e4652da Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 4 May 2015 10:11:28 +0200 Subject: [ticket/13782] Rename null log to dummy for PHP7 compatibility PHPBB3-13782 --- tests/console/cache/purge_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/console/cache/purge_test.php') diff --git a/tests/console/cache/purge_test.php b/tests/console/cache/purge_test.php index 172fb0ecf3..6c92660580 100644 --- a/tests/console/cache/purge_test.php +++ b/tests/console/cache/purge_test.php @@ -91,7 +91,7 @@ class phpbb_console_command_cache_purge_test extends phpbb_test_case public function get_command_tester() { $application = new Application(); - $application->add(new purge($this->user, $this->cache, $this->db, $this->getMock('\phpbb\auth\auth'), new \phpbb\log\null(), $this->config)); + $application->add(new purge($this->user, $this->cache, $this->db, $this->getMock('\phpbb\auth\auth'), new \phpbb\log\dummy(), $this->config)); $command = $application->find('cache:purge'); $this->command_name = $command->getName(); -- cgit v1.2.1