aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mock/notifications_auth.php
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-10-05 15:09:29 -0500
committerNathan Guse <nathaniel.guse@gmail.com>2012-10-05 15:09:29 -0500
commita57f207d6893289598bcd5e37f2549eea60d1137 (patch)
tree41b8683769d31046ea122cf1e0cfa083466c0af7 /tests/mock/notifications_auth.php
parent948bd69495175db6967c0f5e99c3e0ba31e1882a (diff)
downloadforums-a57f207d6893289598bcd5e37f2549eea60d1137.tar
forums-a57f207d6893289598bcd5e37f2549eea60d1137.tar.gz
forums-a57f207d6893289598bcd5e37f2549eea60d1137.tar.bz2
forums-a57f207d6893289598bcd5e37f2549eea60d1137.tar.xz
forums-a57f207d6893289598bcd5e37f2549eea60d1137.zip
[ticket/11103] More extensive notification tests
PHPBB3-11103
Diffstat (limited to 'tests/mock/notifications_auth.php')
-rw-r--r--tests/mock/notifications_auth.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/mock/notifications_auth.php b/tests/mock/notifications_auth.php
new file mode 100644
index 0000000000..d1c1458de7
--- /dev/null
+++ b/tests/mock/notifications_auth.php
@@ -0,0 +1,35 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_mock_notifications_auth extends phpbb_auth
+{
+ function acl_get_list($user_id = false, $opts = false, $forum_id = false)
+ {
+ $user_id = (!is_array($user_id)) ? array($user_id) : $user_id;
+ $opts = (!is_array($opts)) ? array($opts) : $opts;
+ $forum_id = (!is_array($forum_id)) ? array($forum_id) : $forum_id;
+
+ $auth_list = array();
+
+ foreach ($forum_id as $fid)
+ {
+ foreach ($opts as $opt)
+ {
+ $auth_list[$fid][$opt] = array();
+
+ foreach ($user_id as $uid)
+ {
+ $auth_list[$fid][$opt][] = $uid;
+ }
+ }
+ }
+
+ return $auth_list;
+ }
+}