aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functions_user
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-01-20 20:59:27 +0100
committerJoas Schilling <nickvergessen@gmx.de>2013-01-20 20:59:27 +0100
commitddec4e00d54c3c6e409cdf005442d36ccd9cf120 (patch)
tree86b39dec702341160422294fa28f8c43c775f7f9 /tests/functions_user
parent6a972da4c7d0cc8008ff95d41b5fb71cb17e107e (diff)
downloadforums-ddec4e00d54c3c6e409cdf005442d36ccd9cf120.tar
forums-ddec4e00d54c3c6e409cdf005442d36ccd9cf120.tar.gz
forums-ddec4e00d54c3c6e409cdf005442d36ccd9cf120.tar.bz2
forums-ddec4e00d54c3c6e409cdf005442d36ccd9cf120.tar.xz
forums-ddec4e00d54c3c6e409cdf005442d36ccd9cf120.zip
[ticket/9492] Fix missing phpbb_container in unit tests
PHPBB3-9492
Diffstat (limited to 'tests/functions_user')
-rw-r--r--tests/functions_user/group_user_attributes_test.php9
1 files changed, 8 insertions, 1 deletions
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);