aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJosh Woody <a_jelly_doughnut@phpbb.com>2010-07-17 14:34:36 -0500
committerJoas Schilling <nickvergessen@gmx.de>2012-08-29 17:50:12 +0200
commit1ab41f8dc6ec81f2aaf152229d5f0275de796c85 (patch)
treea1b85dd17c49b8f588bb2d41d1e6750830920f2e /tests
parentf570558a8da65596b0ca2700e2e7829548d2393a (diff)
downloadforums-1ab41f8dc6ec81f2aaf152229d5f0275de796c85.tar
forums-1ab41f8dc6ec81f2aaf152229d5f0275de796c85.tar.gz
forums-1ab41f8dc6ec81f2aaf152229d5f0275de796c85.tar.bz2
forums-1ab41f8dc6ec81f2aaf152229d5f0275de796c85.tar.xz
forums-1ab41f8dc6ec81f2aaf152229d5f0275de796c85.zip
[feature/soft-delete] Fix some small bugs
To wit: using non-existing constant POST_DELETED in posting.php; first test post was initially unapproved; soft delete checkbox appeared at post time Links pointing to the wrong place. PHPBB3-9657
Diffstat (limited to 'tests')
-rw-r--r--tests/class_visibility/class_visibility_test.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/class_visibility/class_visibility_test.php b/tests/class_visibility/class_visibility_test.php
index 8503867b09..20aa207f46 100644
--- a/tests/class_visibility/class_visibility_test.php
+++ b/tests/class_visibility/class_visibility_test.php
@@ -181,14 +181,19 @@ class phpbb_class_visibility_test extends PHPUnit_Framework_TestCase
$GLOBALS['auth'] = new phpbb_acl_mock_founder;
$sql_data = array();
- phpbb_content_visibility::hide_post(4, 111122211, $sql_data);
+ phpbb_content_visibility::hide_post(4, 111122211, array('topic_replies' => 1), $sql_data);
$this->assertEquals(
array(FORUMS_TABLE => 'forum_posts = forum_posts - 1',
TOPICS_TABLE => 'topic_replies = topic_replies - 1, topic_last_view_time = 111122211',
USERS_TABLE => 'user_posts = user_posts - 1'),
$sql_data);
+
+ $sql_data = array();
+ phpbb_content_visibility::hide_post(4, 111122211, array('topic_replies' => 0), $sql_data);
+ $this->assertEquals(
+ array(FORUMS_TABLE => 'forum_posts = forum_posts - 1',
+ TOPICS_TABLE => 'topic_last_view_time = 111122211',
+ USERS_TABLE => 'user_posts = user_posts - 1'),
+ $sql_data);
}
}
-
-//$a = new phpbb_class_visibility_test;
-//$a->test_can_soft_delete(); \ No newline at end of file