aboutsummaryrefslogtreecommitdiffstats
path: root/tests/privmsgs
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-07-04 13:00:04 +0200
committerJoas Schilling <nickvergessen@gmx.de>2012-07-04 13:00:04 +0200
commit7988045bda2b9fbf0dc9482ed985b5b680ce4e95 (patch)
tree88e107ea44d8752f86e43c0257e021ac181becd2 /tests/privmsgs
parentd30dc11f3e1ade19fd8643bdded6f11625da1bb3 (diff)
downloadforums-7988045bda2b9fbf0dc9482ed985b5b680ce4e95.tar
forums-7988045bda2b9fbf0dc9482ed985b5b680ce4e95.tar.gz
forums-7988045bda2b9fbf0dc9482ed985b5b680ce4e95.tar.bz2
forums-7988045bda2b9fbf0dc9482ed985b5b680ce4e95.tar.xz
forums-7988045bda2b9fbf0dc9482ed985b5b680ce4e95.zip
[ticket/10950] Fix unit tests to reflect desired behaviour
See http://wiki.phpbb.com/Deleting_Private_Messages for further explanation. PHPBB3-10950
Diffstat (limited to 'tests/privmsgs')
-rw-r--r--tests/privmsgs/delete_user_pms_test.php29
-rw-r--r--tests/privmsgs/fixtures/delete_user_pms.xml80
2 files changed, 105 insertions, 4 deletions
diff --git a/tests/privmsgs/delete_user_pms_test.php b/tests/privmsgs/delete_user_pms_test.php
index b399d94c6d..e5c0e82712 100644
--- a/tests/privmsgs/delete_user_pms_test.php
+++ b/tests/privmsgs/delete_user_pms_test.php
@@ -28,14 +28,23 @@ class phpbb_privmsgs_delete_user_pms_test extends phpbb_database_test_case
2,
array(
array('msg_id' => 1),
- array('msg_id' => 2),
+ //array('msg_id' => 2),
+ //array('msg_id' => 3),
+ //array('msg_id' => 4),
+ //array('msg_id' => 5),
),
array(
//array('msg_id' => 1, 'user_id' => 2),
array('msg_id' => 1, 'user_id' => 3),
array('msg_id' => 1, 'user_id' => 4),
//array('msg_id' => 2, 'user_id' => 2),
- array('msg_id' => 2, 'user_id' => 4),
+ //array('msg_id' => 2, 'user_id' => 4),
+ //array('msg_id' => 4, 'user_id' => 3),
+ //array('msg_id' => 3, 'user_id' => 2),
+ //array('msg_id' => 4, 'user_id' => 3),
+ //array('msg_id' => 5, 'user_id' => 2),
+ //array('msg_id' => 5, 'user_id' => 3),
+ //array('msg_id' => 5, 'user_id' => 4),
),
),
array(
@@ -43,6 +52,9 @@ class phpbb_privmsgs_delete_user_pms_test extends phpbb_database_test_case
array(
array('msg_id' => 1),
array('msg_id' => 2),
+ array('msg_id' => 3),
+ //array('msg_id' => 4),
+ array('msg_id' => 5),
),
array(
array('msg_id' => 1, 'user_id' => 2),
@@ -50,6 +62,11 @@ class phpbb_privmsgs_delete_user_pms_test extends phpbb_database_test_case
array('msg_id' => 1, 'user_id' => 4),
array('msg_id' => 2, 'user_id' => 2),
array('msg_id' => 2, 'user_id' => 4),
+ array('msg_id' => 3, 'user_id' => 2),
+ //array('msg_id' => 4, 'user_id' => 3),
+ array('msg_id' => 5, 'user_id' => 2),
+ //array('msg_id' => 5, 'user_id' => 3),
+ array('msg_id' => 5, 'user_id' => 4),
),
),
array(
@@ -57,6 +74,9 @@ class phpbb_privmsgs_delete_user_pms_test extends phpbb_database_test_case
array(
array('msg_id' => 1),
array('msg_id' => 2),
+ array('msg_id' => 3),
+ array('msg_id' => 4),
+ array('msg_id' => 5),
),
array(
array('msg_id' => 1, 'user_id' => 2),
@@ -64,6 +84,11 @@ class phpbb_privmsgs_delete_user_pms_test extends phpbb_database_test_case
array('msg_id' => 1, 'user_id' => 4),
array('msg_id' => 2, 'user_id' => 2),
array('msg_id' => 2, 'user_id' => 4),
+ array('msg_id' => 3, 'user_id' => 2),
+ array('msg_id' => 4, 'user_id' => 3),
+ array('msg_id' => 5, 'user_id' => 2),
+ array('msg_id' => 5, 'user_id' => 3),
+ array('msg_id' => 5, 'user_id' => 4),
),
),
);
diff --git a/tests/privmsgs/fixtures/delete_user_pms.xml b/tests/privmsgs/fixtures/delete_user_pms.xml
index 848164080c..56970689a3 100644
--- a/tests/privmsgs/fixtures/delete_user_pms.xml
+++ b/tests/privmsgs/fixtures/delete_user_pms.xml
@@ -66,14 +66,50 @@
<value>0</value>
<value>2</value>
<value>#1</value>
- <value>#1</value>
+ <value>
+ 2 - outbox
+ 3 - inbox
+ 4 - nobox
+ </value>
</row>
<row>
<value>2</value>
<value>0</value>
<value>2</value>
<value>#2</value>
- <value>#2</value>
+ <value>
+ 2 - outbox
+ 4 - nobox
+ </value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>0</value>
+ <value>2</value>
+ <value>#3</value>
+ <value>
+ 2 - outbox
+ </value>
+ </row>
+ <row>
+ <value>4</value>
+ <value>0</value>
+ <value>2</value>
+ <value>#4</value>
+ <value>
+ 3 - nobox
+ </value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>0</value>
+ <value>2</value>
+ <value>#5</value>
+ <value>
+ 2 - outbox
+ 3 - nobox
+ 4 - nobox
+ </value>
</row>
</table>
<table name="phpbb_privmsgs_to">
@@ -123,5 +159,45 @@
<value>0</value>
<value>-3</value>
</row>
+ <row>
+ <value>3</value>
+ <value>2</value>
+ <value>2</value>
+ <value>0</value>
+ <value>0</value>
+ <value>-2</value>
+ </row>
+ <row>
+ <value>4</value>
+ <value>3</value>
+ <value>2</value>
+ <value>0</value>
+ <value>0</value>
+ <value>-3</value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>2</value>
+ <value>2</value>
+ <value>0</value>
+ <value>0</value>
+ <value>-2</value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>3</value>
+ <value>2</value>
+ <value>0</value>
+ <value>0</value>
+ <value>-3</value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>4</value>
+ <value>2</value>
+ <value>0</value>
+ <value>0</value>
+ <value>-3</value>
+ </row>
</table>
</dataset>