From 69df6b49db73d1a475d0b410f38fb4efb56d7451 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 21 Mar 2013 03:08:15 +0100 Subject: [ticket/11460] Add test for whether post_email and topic_email are checked. PHPBB3-11460 --- tests/functional/notification_test.php | 46 ++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tests/functional/notification_test.php (limited to 'tests/functional/notification_test.php') diff --git a/tests/functional/notification_test.php b/tests/functional/notification_test.php new file mode 100644 index 0000000000..519fb8152b --- /dev/null +++ b/tests/functional/notification_test.php @@ -0,0 +1,46 @@ +login(); + $crawler = $this->request('GET', 'ucp.php?i=ucp_notifications&mode=notification_options'); + $this->assert_response_success(); + + $cplist = $crawler->filter('.cplist'); + if ($expected_status) + { + $this->assert_checkbox_is_checked($cplist, $checkbox_name); + } + else + { + $this->assert_checkbox_is_unchecked($cplist, $checkbox_name); + } + } +} -- cgit v1.2.1 From d3decaeedff926f2945285b713e85c09c3de9daf Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 24 Mar 2013 23:42:13 +0100 Subject: [ticket/11460] Add default behaviour tests for notification and email types. PHPBB3-11460 --- tests/functional/notification_test.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'tests/functional/notification_test.php') diff --git a/tests/functional/notification_test.php b/tests/functional/notification_test.php index 519fb8152b..ec495da602 100644 --- a/tests/functional/notification_test.php +++ b/tests/functional/notification_test.php @@ -15,12 +15,22 @@ class phpbb_functional_notification_test extends phpbb_functional_test_case static public function user_subscription_data() { return array( + // Rows inserted by phpBB/install/schemas/schema_data.sql + // Also see PHPBB3-11460 array('post_notification', true), array('topic_notification', true), - - // PHPBB3-11460 array('post_email', true), array('topic_email', true), + + // Default behaviour for in-board notifications: + // If user did not opt-out, in-board notifications are on. + array('bookmark_notification', true), + array('quote_notification', true), + + // Default behaviour for email notifications: + // If user did not opt-in, email notifications are off. + array('bookmark_email', false), + array('quote_email', false), ); } -- cgit v1.2.1 From f17e67364dca55c9ccd8416f41547fa4097cdcd4 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sat, 11 May 2013 23:33:40 +0300 Subject: [ticket/11533] Update unit tests Update notification settings functional unit test for new layout PHPBB3-11533 --- tests/functional/notification_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/functional/notification_test.php') diff --git a/tests/functional/notification_test.php b/tests/functional/notification_test.php index ec495da602..fa6513a0ba 100644 --- a/tests/functional/notification_test.php +++ b/tests/functional/notification_test.php @@ -43,7 +43,7 @@ class phpbb_functional_notification_test extends phpbb_functional_test_case $crawler = $this->request('GET', 'ucp.php?i=ucp_notifications&mode=notification_options'); $this->assert_response_success(); - $cplist = $crawler->filter('.cplist'); + $cplist = $crawler->filter('.table1'); if ($expected_status) { $this->assert_checkbox_is_checked($cplist, $checkbox_name); -- cgit v1.2.1 From f1523944a048e22207d6f200c6d152ecb9fdc136 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 28 May 2013 14:58:40 +0200 Subject: [ticket/develop/11568] Remove unneccessary calls to assert_response_success() PHPBB3-11568 --- tests/functional/notification_test.php | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/functional/notification_test.php') diff --git a/tests/functional/notification_test.php b/tests/functional/notification_test.php index fa6513a0ba..ad4f3acdc2 100644 --- a/tests/functional/notification_test.php +++ b/tests/functional/notification_test.php @@ -41,7 +41,6 @@ class phpbb_functional_notification_test extends phpbb_functional_test_case { $this->login(); $crawler = $this->request('GET', 'ucp.php?i=ucp_notifications&mode=notification_options'); - $this->assert_response_success(); $cplist = $crawler->filter('.table1'); if ($expected_status) -- cgit v1.2.1