From 053c75543de4c8e5d787a2e344b837f867842f8d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 25 Mar 2013 15:34:18 +0100 Subject: [PATCH] [ticket/11405] Correctly prefill the tables (missed the posts and not-types) PHPBB3-11405 --- .../fixtures/submit_post_notification.xml | 34 +++++++++++++++++++ .../submit_post_type_post_test.php | 6 ++-- .../submit_post_type_quote_test.php | 4 +-- 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/tests/notification/fixtures/submit_post_notification.xml b/tests/notification/fixtures/submit_post_notification.xml index 5c59edf073..51dd2f8dbd 100644 --- a/tests/notification/fixtures/submit_post_notification.xml +++ b/tests/notification/fixtures/submit_post_notification.xml @@ -25,12 +25,14 @@ user_id item_id item_parent_id + notification_read notification_data post 5 1 1 + 0 @@ -38,6 +40,7 @@ 5 1 1 + 0 @@ -45,10 +48,41 @@ 8 1 1 + 0 + + notification_type + notification_type_enabled + + post + 1 + + + quote + 1 + +
+ post_id + topic_id + forum_id + post_text + + 1 + 1 + 1 + + +
+ + topic_id + forum_id + + 1 + 1 +
topic_id diff --git a/tests/notification/submit_post_type_post_test.php b/tests/notification/submit_post_type_post_test.php index 2e269ff080..f439c49167 100644 --- a/tests/notification/submit_post_type_post_test.php +++ b/tests/notification/submit_post_type_post_test.php @@ -92,10 +92,10 @@ class phpbb_notification_submit_post_type_post_test extends phpbb_notification_s ORDER BY user_id ASC, item_id ASC"; $result = $this->db->sql_query($sql); $this->assertEquals(array( - array('user_id' => 3, 'item_id' => 1, 'item_parent_id' => 1), + array('user_id' => 3, 'item_id' => 2, 'item_parent_id' => 1), array('user_id' => 5, 'item_id' => 1, 'item_parent_id' => 1), - array('user_id' => 6, 'item_id' => 1, 'item_parent_id' => 1), - array('user_id' => 7, 'item_id' => 1, 'item_parent_id' => 1), + array('user_id' => 6, 'item_id' => 2, 'item_parent_id' => 1), + array('user_id' => 7, 'item_id' => 2, 'item_parent_id' => 1), array('user_id' => 8, 'item_id' => 1, 'item_parent_id' => 1), ), $this->db->sql_fetchrowset($result)); $this->db->sql_freeresult($result); diff --git a/tests/notification/submit_post_type_quote_test.php b/tests/notification/submit_post_type_quote_test.php index 603f7b2020..9b2323f770 100644 --- a/tests/notification/submit_post_type_quote_test.php +++ b/tests/notification/submit_post_type_quote_test.php @@ -98,9 +98,9 @@ class phpbb_notification_submit_post_type_quote_test extends phpbb_notification_ ORDER BY user_id ASC, item_id ASC"; $result = $this->db->sql_query($sql); $this->assertEquals(array( - array('user_id' => 3, 'item_id' => 1, 'item_parent_id' => 1), + array('user_id' => 3, 'item_id' => 2, 'item_parent_id' => 1), array('user_id' => 5, 'item_id' => 1, 'item_parent_id' => 1), - array('user_id' => 7, 'item_id' => 1, 'item_parent_id' => 1), + array('user_id' => 7, 'item_id' => 2, 'item_parent_id' => 1), ), $this->db->sql_fetchrowset($result)); $this->db->sql_freeresult($result); }