aboutsummaryrefslogtreecommitdiffstats
path: root/tests/notification
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-03-27 11:12:33 +0100
committerJoas Schilling <nickvergessen@gmx.de>2013-03-27 11:12:33 +0100
commitbdd2062a667fdf9acde75946c7a9d5d84e84b092 (patch)
tree8cd4a7de5d578514beabec683fac8ea0720e9a22 /tests/notification
parentd8a63047aaef2d8839baf32bbb8df724e1e46b02 (diff)
downloadforums-bdd2062a667fdf9acde75946c7a9d5d84e84b092.tar
forums-bdd2062a667fdf9acde75946c7a9d5d84e84b092.tar.gz
forums-bdd2062a667fdf9acde75946c7a9d5d84e84b092.tar.bz2
forums-bdd2062a667fdf9acde75946c7a9d5d84e84b092.tar.xz
forums-bdd2062a667fdf9acde75946c7a9d5d84e84b092.zip
[ticket/11474] Add test user with only global m_approve permissions
PHPBB3-11405 PHPBB3-11474
Diffstat (limited to 'tests/notification')
-rw-r--r--tests/notification/fixtures/submit_post_post_in_queue.xml15
-rw-r--r--tests/notification/submit_post_type_post_in_queue_test.php9
2 files changed, 22 insertions, 2 deletions
diff --git a/tests/notification/fixtures/submit_post_post_in_queue.xml b/tests/notification/fixtures/submit_post_post_in_queue.xml
index 4162d01d7f..eedcebf71d 100644
--- a/tests/notification/fixtures/submit_post_post_in_queue.xml
+++ b/tests/notification/fixtures/submit_post_post_in_queue.xml
@@ -107,6 +107,14 @@
<value></value>
<value></value>
</row>
+ <row>
+ <value>9</value>
+ <value>test glboal-permissions</value>
+ <value></value>
+ <value></value>
+ <value></value>
+ <value></value>
+ </row>
</table>
<table name="phpbb_user_notifications">
<column>item_type</column>
@@ -156,5 +164,12 @@
<value></value>
<value>0</value>
</row>
+ <row>
+ <value>needs_approval</value>
+ <value>0</value>
+ <value>9</value>
+ <value></value>
+ <value>1</value>
+ </row>
</table>
</dataset>
diff --git a/tests/notification/submit_post_type_post_in_queue_test.php b/tests/notification/submit_post_type_post_in_queue_test.php
index 375ee3fbef..6a7ac44e39 100644
--- a/tests/notification/submit_post_type_post_in_queue_test.php
+++ b/tests/notification/submit_post_type_post_in_queue_test.php
@@ -31,18 +31,21 @@ class phpbb_notification_submit_post_type_post_in_queue_test extends phpbb_notif
'm_approve',
array(1, 0),
array(
+ 0 => array(
+ 'm_approve' => array(9),
+ ),
1 => array(
'm_approve' => array(3, 4, 6, 7, 8),
),
),
),
array(
- array(3, 4, 6, 7, 8),
+ array(3, 4, 6, 7, 8, 9),
'f_read',
1,
array(
1 => array(
- 'f_read' => array(3, 6, 7, 8),
+ 'f_read' => array(3, 6, 7, 8, 9),
),
),
),
@@ -84,6 +87,7 @@ class phpbb_notification_submit_post_type_post_in_queue_test extends phpbb_notif
* 6 => Moderator, but already notified, should STILL receive a new notification
* 7 => Moderator, but option disabled, should NOT receive a notification
* 8 => Moderator, option set to default, should receive a notification
+ * 9 => Moderator, has only global mod permissions, should receive a notification
*/
array(
array('force_approved_state' => false),
@@ -95,6 +99,7 @@ class phpbb_notification_submit_post_type_post_in_queue_test extends phpbb_notif
array('user_id' => 6, 'item_id' => 1, 'item_parent_id' => 1),
array('user_id' => 6, 'item_id' => 2, 'item_parent_id' => 1),
array('user_id' => 8, 'item_id' => 2, 'item_parent_id' => 1),
+ array('user_id' => 9, 'item_id' => 2, 'item_parent_id' => 1),
),
),
);