mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge pull request #2194 from bantu/ticket/12317
[ticket/12317] Fix notification tests for DBMS drivers using int for integers ;-)
This commit is contained in:
commit
6d0b7bba3f
8 changed files with 9 additions and 14 deletions
|
@ -75,7 +75,7 @@ class bookmark extends \phpbb\notification\type\post
|
||||||
$result = $this->db->sql_query($sql);
|
$result = $this->db->sql_query($sql);
|
||||||
while ($row = $this->db->sql_fetchrow($result))
|
while ($row = $this->db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$users[] = $row['user_id'];
|
$users[] = (int) $row['user_id'];
|
||||||
}
|
}
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ class post extends \phpbb\notification\type\base
|
||||||
$result = $this->db->sql_query($sql);
|
$result = $this->db->sql_query($sql);
|
||||||
while ($row = $this->db->sql_fetchrow($result))
|
while ($row = $this->db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$users[] = $row['user_id'];
|
$users[] = (int) $row['user_id'];
|
||||||
}
|
}
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ class post extends \phpbb\notification\type\base
|
||||||
$result = $this->db->sql_query($sql);
|
$result = $this->db->sql_query($sql);
|
||||||
while ($row = $this->db->sql_fetchrow($result))
|
while ($row = $this->db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$users[] = $row['user_id'];
|
$users[] = (int) $row['user_id'];
|
||||||
}
|
}
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ class quote extends \phpbb\notification\type\post
|
||||||
$result = $this->db->sql_query($sql);
|
$result = $this->db->sql_query($sql);
|
||||||
while ($row = $this->db->sql_fetchrow($result))
|
while ($row = $this->db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$users[] = $row['user_id'];
|
$users[] = (int) $row['user_id'];
|
||||||
}
|
}
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ class topic extends \phpbb\notification\type\base
|
||||||
$result = $this->db->sql_query($sql);
|
$result = $this->db->sql_query($sql);
|
||||||
while ($row = $this->db->sql_fetchrow($result))
|
while ($row = $this->db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$users[] = $row['user_id'];
|
$users[] = (int) $row['user_id'];
|
||||||
}
|
}
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ abstract class phpbb_notification_submit_post_base extends phpbb_database_test_c
|
||||||
FROM ' . NOTIFICATIONS_TABLE . ' n, ' . NOTIFICATION_TYPES_TABLE . " nt
|
FROM ' . NOTIFICATIONS_TABLE . ' n, ' . NOTIFICATION_TYPES_TABLE . " nt
|
||||||
WHERE nt.notification_type_name = '" . $this->item_type . "'
|
WHERE nt.notification_type_name = '" . $this->item_type . "'
|
||||||
AND n.notification_type_id = nt.notification_type_id
|
AND n.notification_type_id = nt.notification_type_id
|
||||||
ORDER BY user_id, 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_before, $this->db->sql_fetchrowset($result));
|
$this->assertEquals($expected_before, $this->db->sql_fetchrowset($result));
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
@ -142,11 +142,6 @@ abstract class phpbb_notification_submit_post_base extends phpbb_database_test_c
|
||||||
$post_data = array_merge($this->post_data, $additional_post_data);
|
$post_data = array_merge($this->post_data, $additional_post_data);
|
||||||
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
|
|
||||||
FROM ' . NOTIFICATIONS_TABLE . ' n, ' . NOTIFICATION_TYPES_TABLE . " nt
|
|
||||||
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";
|
|
||||||
$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));
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
|
@ -27,7 +27,7 @@ class phpbb_notification_submit_post_type_bookmark_test extends phpbb_notificati
|
||||||
$this->greaterThan(0))
|
$this->greaterThan(0))
|
||||||
->will($this->returnValueMap(array(
|
->will($this->returnValueMap(array(
|
||||||
array(
|
array(
|
||||||
array('3', '4', '5', '6', '7'),
|
array(3, 4, 5, 6, 7),
|
||||||
'f_read',
|
'f_read',
|
||||||
1,
|
1,
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -27,7 +27,7 @@ class phpbb_notification_submit_post_type_post_test extends phpbb_notification_s
|
||||||
$this->greaterThan(0))
|
$this->greaterThan(0))
|
||||||
->will($this->returnValueMap(array(
|
->will($this->returnValueMap(array(
|
||||||
array(
|
array(
|
||||||
array('3', '4', '5', '6', '7', '8'),
|
array(3, 4, 5, 6, 7, 8),
|
||||||
'f_read',
|
'f_read',
|
||||||
1,
|
1,
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -27,7 +27,7 @@ class phpbb_notification_submit_post_type_quote_test extends phpbb_notification_
|
||||||
$this->greaterThan(0))
|
$this->greaterThan(0))
|
||||||
->will($this->returnValueMap(array(
|
->will($this->returnValueMap(array(
|
||||||
array(
|
array(
|
||||||
array('3', '4', '5', '6', '7'),
|
array(3, 4, 5, 6, 7),
|
||||||
'f_read',
|
'f_read',
|
||||||
1,
|
1,
|
||||||
array(
|
array(
|
||||||
|
|
Loading…
Add table
Reference in a new issue