aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/functions_user/delete_user_test.php28
-rw-r--r--tests/functions_user/fixtures/delete_user.xml10
2 files changed, 24 insertions, 14 deletions
diff --git a/tests/functions_user/delete_user_test.php b/tests/functions_user/delete_user_test.php
index 399dc6a064..d5c78c64ad 100644
--- a/tests/functions_user/delete_user_test.php
+++ b/tests/functions_user/delete_user_test.php
@@ -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);
diff --git a/tests/functions_user/fixtures/delete_user.xml b/tests/functions_user/fixtures/delete_user.xml
index 2e09182780..56014b35d1 100644
--- a/tests/functions_user/fixtures/delete_user.xml
+++ b/tests/functions_user/fixtures/delete_user.xml
@@ -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>