From 5cc0488f74633a9f28011ed935a3b7e902ba4497 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 3 Feb 2015 23:13:37 +0100 Subject: [ticket/9109] Only query database once in phpbb_get_max_setting_from_group More test cases have been added, too. PHPBB3-9109 --- .../fixtures/get_max_setting_from_group.xml | 21 +++++++++++++++++++++ .../get_max_setting_from_group_test.php | 4 ++++ 2 files changed, 25 insertions(+) (limited to 'tests') 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 @@ 0 0 + + 4 + + 0 + 5 + user_id @@ -58,5 +64,20 @@ 30 + + 4 + 4 + 0 + + + 5 + 3 + 1 + + + 5 + 2 + 0 +
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'), ); } -- cgit v1.2.1