mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-17 22:28:46 +01:00
[ticket/10729] Also test *delete_user on posts and topics
PHPBB3-10729
This commit is contained in:
parent
d6008e896a
commit
96024e88e9
@ -205,20 +205,20 @@ class phpbb_functions_user_delete_user_test extends phpbb_database_test_case
|
||||
array(
|
||||
'retain',
|
||||
array(
|
||||
array('post_id' => 1, 'post_reported' => 1, 'post_edit_user' => 1),
|
||||
array('post_id' => 2, 'post_reported' => 1, 'post_edit_user' => 1),
|
||||
array('post_id' => 3, 'post_reported' => 0, 'post_edit_user' => 1),
|
||||
array('post_id' => 4, 'post_reported' => 0, 'post_edit_user' => 1),
|
||||
array('post_id' => 1, 'post_reported' => 1, 'post_edit_user' => 1, 'post_delete_user' => 1),
|
||||
array('post_id' => 2, 'post_reported' => 1, 'post_edit_user' => 1, 'post_delete_user' => 1),
|
||||
array('post_id' => 3, 'post_reported' => 0, 'post_edit_user' => 1, 'post_delete_user' => 1),
|
||||
array('post_id' => 4, 'post_reported' => 0, 'post_edit_user' => 1, 'post_delete_user' => 1),
|
||||
),
|
||||
array(
|
||||
array('report_id' => 1, 'post_id' => 1, 'user_id' => 1),
|
||||
array('report_id' => 3, 'post_id' => 2, 'user_id' => 1),
|
||||
),
|
||||
array(
|
||||
array('topic_id' => 1, 'topic_reported' => 1),
|
||||
array('topic_id' => 2, 'topic_reported' => 1),
|
||||
array('topic_id' => 3, 'topic_reported' => 0),
|
||||
array('topic_id' => 4, 'topic_reported' => 0),
|
||||
array('topic_id' => 1, 'topic_reported' => 1, 'topic_delete_user' => 1),
|
||||
array('topic_id' => 2, 'topic_reported' => 1, 'topic_delete_user' => 1),
|
||||
array('topic_id' => 3, 'topic_reported' => 0, 'topic_delete_user' => 1),
|
||||
array('topic_id' => 4, 'topic_reported' => 0, 'topic_delete_user' => 1),
|
||||
),
|
||||
array(
|
||||
array('attach_id' => 1, 'post_msg_id' => 1, 'poster_id' => 1),
|
||||
@ -229,15 +229,15 @@ class phpbb_functions_user_delete_user_test extends phpbb_database_test_case
|
||||
array(
|
||||
'remove',
|
||||
array(
|
||||
array('post_id' => 2, 'post_reported' => 1, 'post_edit_user' => 1),
|
||||
array('post_id' => 4, 'post_reported' => 0, 'post_edit_user' => 1),
|
||||
array('post_id' => 2, 'post_reported' => 1, 'post_edit_user' => 1, 'post_delete_user' => 1),
|
||||
array('post_id' => 4, 'post_reported' => 0, 'post_edit_user' => 1, 'post_delete_user' => 1),
|
||||
),
|
||||
array(
|
||||
array('report_id' => 3, 'post_id' => 2, 'user_id' => 1),
|
||||
),
|
||||
array(
|
||||
array('topic_id' => 2, 'topic_reported' => 1),
|
||||
array('topic_id' => 4, 'topic_reported' => 0),
|
||||
array('topic_id' => 2, 'topic_reported' => 1, 'topic_delete_user' => 1),
|
||||
array('topic_id' => 4, 'topic_reported' => 0, 'topic_delete_user' => 1),
|
||||
),
|
||||
array(
|
||||
array('attach_id' => 2, 'post_msg_id' => 2, 'poster_id' => 1),
|
||||
@ -254,7 +254,7 @@ class phpbb_functions_user_delete_user_test extends phpbb_database_test_case
|
||||
{
|
||||
$this->assertFalse(user_delete($mode, 2));
|
||||
|
||||
$sql = 'SELECT post_id, post_reported, post_edit_user
|
||||
$sql = 'SELECT post_id, post_reported, post_edit_user, post_delete_user
|
||||
FROM ' . POSTS_TABLE . '
|
||||
ORDER BY post_id ASC';
|
||||
$result = $this->db->sql_query($sql);
|
||||
@ -268,7 +268,7 @@ class phpbb_functions_user_delete_user_test extends phpbb_database_test_case
|
||||
$this->assertEquals($expected_reports, $this->db->sql_fetchrowset($result), 'Report table content is mismatching after deleting a user.');
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT topic_id, topic_reported
|
||||
$sql = 'SELECT topic_id, topic_reported, topic_delete_user
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
ORDER BY topic_id ASC';
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
@ -148,6 +148,7 @@
|
||||
<column>post_id</column>
|
||||
<column>poster_id</column>
|
||||
<column>post_edit_user</column>
|
||||
<column>post_delete_user</column>
|
||||
<column>post_username</column>
|
||||
<column>topic_id</column>
|
||||
<column>forum_id</column>
|
||||
@ -159,6 +160,7 @@
|
||||
<value>1</value>
|
||||
<value>2</value>
|
||||
<value>2</value>
|
||||
<value>2</value>
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
@ -171,6 +173,7 @@
|
||||
<value>2</value>
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
<value>Other</value>
|
||||
<value>2</value>
|
||||
<value>2</value>
|
||||
@ -183,6 +186,7 @@
|
||||
<value>3</value>
|
||||
<value>2</value>
|
||||
<value>2</value>
|
||||
<value>2</value>
|
||||
<value></value>
|
||||
<value>3</value>
|
||||
<value>3</value>
|
||||
@ -195,6 +199,7 @@
|
||||
<value>4</value>
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
<value>Other</value>
|
||||
<value>4</value>
|
||||
<value>4</value>
|
||||
@ -308,6 +313,7 @@
|
||||
<column>forum_id</column>
|
||||
<column>topic_reported</column>
|
||||
<column>topic_poster</column>
|
||||
<column>topic_delete_user</column>
|
||||
<column>topic_first_poster_name</column>
|
||||
<column>topic_first_poster_colour</column>
|
||||
<column>topic_last_poster_id</column>
|
||||
@ -318,6 +324,7 @@
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
<value>2</value>
|
||||
<value>2</value>
|
||||
<value></value>
|
||||
<value>00AA00</value>
|
||||
<value>2</value>
|
||||
@ -329,6 +336,7 @@
|
||||
<value>2</value>
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
<value>Other</value>
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
@ -340,6 +348,7 @@
|
||||
<value>3</value>
|
||||
<value>1</value>
|
||||
<value>2</value>
|
||||
<value>2</value>
|
||||
<value></value>
|
||||
<value>00AA00</value>
|
||||
<value>2</value>
|
||||
@ -351,6 +360,7 @@
|
||||
<value>4</value>
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
<value>Other</value>
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
|
Loading…
x
Reference in New Issue
Block a user