[ticket/11413] Fix some more tests

PHPBB3-11413
This commit is contained in:
Nathaniel Guse 2013-04-29 22:41:08 -05:00
parent 4cd0914f89
commit 78c22248fa

View file

@ -119,8 +119,9 @@ class phpbb_notification_submit_post_base extends phpbb_database_test_case
public function test_submit_post($additional_post_data, $expected_before, $expected_after) public function test_submit_post($additional_post_data, $expected_before, $expected_after)
{ {
$sql = 'SELECT user_id, item_id, item_parent_id $sql = 'SELECT user_id, item_id, item_parent_id
FROM ' . NOTIFICATIONS_TABLE . " FROM ' . NOTIFICATIONS_TABLE . ' n, ' . NOTIFICATIONS_TYPES_TABLE . " nt
WHERE item_type = '" . $this->item_type . "' WHERE nt.notification_type_name = '" . $this->item_type . "'
AND n.notification_type_id = nt.notification_type_id
ORDER BY user_id, item_id ASC"; ORDER BY user_id, item_id ASC";
$result = $this->db->sql_query($sql); $result = $this->db->sql_query($sql);
$this->assertEquals($expected_before, $this->db->sql_fetchrowset($result)); $this->assertEquals($expected_before, $this->db->sql_fetchrowset($result));
@ -131,8 +132,9 @@ class phpbb_notification_submit_post_base extends phpbb_database_test_case
submit_post('reply', '', 'poster-name', POST_NORMAL, $poll_data, $post_data, false, false); submit_post('reply', '', 'poster-name', POST_NORMAL, $poll_data, $post_data, false, false);
$sql = 'SELECT user_id, item_id, item_parent_id $sql = 'SELECT user_id, item_id, item_parent_id
FROM ' . NOTIFICATIONS_TABLE . " FROM ' . NOTIFICATIONS_TABLE . ' n, ' . NOTIFICATIONS_TYPES_TABLE . " nt
WHERE item_type = '" . $this->item_type . "' WHERE nt.notification_type_name = '" . $this->item_type . "'
AND n.notification_type_id = nt.notification_type_id
ORDER BY user_id ASC, item_id ASC"; ORDER BY user_id ASC, item_id ASC";
$result = $this->db->sql_query($sql); $result = $this->db->sql_query($sql);
$this->assertEquals($expected_after, $this->db->sql_fetchrowset($result)); $this->assertEquals($expected_after, $this->db->sql_fetchrowset($result));