From ddec4e00d54c3c6e409cdf005442d36ccd9cf120 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 20 Jan 2013 20:59:27 +0100 Subject: [ticket/9492] Fix missing phpbb_container in unit tests PHPBB3-9492 --- tests/functions_user/group_user_attributes_test.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/functions_user/group_user_attributes_test.php') diff --git a/tests/functions_user/group_user_attributes_test.php b/tests/functions_user/group_user_attributes_test.php index 35d0b9e348..f13156c2cc 100644 --- a/tests/functions_user/group_user_attributes_test.php +++ b/tests/functions_user/group_user_attributes_test.php @@ -125,7 +125,7 @@ class phpbb_functions_user_group_user_attributes_test extends phpbb_database_tes */ public function test_group_user_attributes($description, $user_id, $group_id, $group_row, $expected) { - global $auth, $cache, $db, $phpbb_dispatcher, $user; + global $auth, $cache, $db, $phpbb_dispatcher, $user, $phpbb_container; $user->ip = ''; $cache = new phpbb_mock_cache; @@ -134,6 +134,13 @@ class phpbb_functions_user_group_user_attributes_test extends phpbb_database_tes $auth = $this->getMock('phpbb_auth'); $auth->expects($this->any()) ->method('acl_clear_prefetch'); + $cache_driver = new phpbb_cache_driver_null(); + $phpbb_container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); + $phpbb_container + ->expects($this->any()) + ->method('get') + ->with('cache.driver') + ->will($this->returnValue($cache_driver)); group_user_attributes('default', $group_id, array($user_id), false, 'group_name', $group_row); -- cgit v1.2.1