aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-02-03 23:13:37 +0100
committerJoas Schilling <nickvergessen@gmx.de>2015-02-08 21:16:05 +0100
commit5cc0488f74633a9f28011ed935a3b7e902ba4497 (patch)
tree0a12336f9cc64e7e408be1ea2f5148490f967096 /tests/functions_privmsgs
parent[ticket/9109] Properly document and calculate the group settings with value 0 (diff)
downloadphpbb-5cc0488f74633a9f28011ed935a3b7e902ba4497.tar.gz
phpbb-5cc0488f74633a9f28011ed935a3b7e902ba4497.tar.bz2
phpbb-5cc0488f74633a9f28011ed935a3b7e902ba4497.zip
[ticket/9109] Only query database once in phpbb_get_max_setting_from_group
More test cases have been added, too. PHPBB3-9109
Diffstat (limited to 'tests/functions_privmsgs')
-rw-r--r--tests/functions_privmsgs/fixtures/get_max_setting_from_group.xml21
-rw-r--r--tests/functions_privmsgs/get_max_setting_from_group_test.php4
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/functions_privmsgs/fixtures/get_max_setting_from_group.xml b/tests/functions_privmsgs/fixtures/get_max_setting_from_group.xml
index b10bf782ec..c78d63f7cb 100644
--- a/tests/functions_privmsgs/fixtures/get_max_setting_from_group.xml
+++ b/tests/functions_privmsgs/fixtures/get_max_setting_from_group.xml
@@ -23,6 +23,12 @@
<value>0</value>
<value>0</value>
</row>
+ <row>
+ <value>4</value>
+ <value></value>
+ <value>0</value>
+ <value>5</value>
+ </row>
</table>
<table name="phpbb_user_group">
<column>user_id</column>
@@ -58,5 +64,20 @@
<value>3</value>
<value>0</value>
</row>
+ <row>
+ <value>4</value>
+ <value>4</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>3</value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>2</value>
+ <value>0</value>
+ </row>
</table>
</dataset>
diff --git a/tests/functions_privmsgs/get_max_setting_from_group_test.php b/tests/functions_privmsgs/get_max_setting_from_group_test.php
index 48d42ec48a..3eb7866802 100644
--- a/tests/functions_privmsgs/get_max_setting_from_group_test.php
+++ b/tests/functions_privmsgs/get_max_setting_from_group_test.php
@@ -36,9 +36,13 @@ class phpbb_functions_privmsgs_get_max_setting_from_group_test extends phpbb_dat
array(1, 0, 'message_limit'),
array(2, 2, 'message_limit'),
array(3, 0, 'message_limit'),
+ array(4, 0, 'message_limit'),
+ array(5, 2, 'message_limit'),
array(1, 0, 'max_recipients'),
array(2, 4, 'max_recipients'),
array(3, 0, 'max_recipients'),
+ array(4, 5, 'max_recipients'),
+ array(5, 4, 'max_recipients'),
);
}