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/avatar/manager_test.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tests/avatar/manager_test.php') diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php index 638ba0aaff..71f40c0b13 100644 --- a/tests/avatar/manager_test.php +++ b/tests/avatar/manager_test.php @@ -94,7 +94,9 @@ class phpbb_avatar_manager_test extends \phpbb_database_test_case // Set up avatar manager $this->manager = new \phpbb\avatar\manager($this->config, $avatar_drivers, $phpbb_container); $this->db = $this->new_dbal(); - $this->user = new \phpbb\user('\phpbb\datetime'); + $lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx); + $lang = new \phpbb\language\language($lang_loader); + $this->user = new \phpbb\user($lang, '\phpbb\datetime'); } protected function avatar_drivers() @@ -277,7 +279,12 @@ class phpbb_avatar_manager_test extends \phpbb_database_test_case public function test_localize_errors() { - $user = $this->getMock('\phpbb\user', array(), array('\phpbb\datetime')); + global $phpbb_root_path, $phpEx; + + $user = $this->getMock('\phpbb\user', array(), array( + new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)), + '\phpbb\datetime') + ); $lang_array = array( array('FOOBAR_OFF', 'foobar_off'), array('FOOBAR_EXPLAIN', 'FOOBAR_EXPLAIN %s'), -- cgit v1.2.1