diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-07-11 15:02:07 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-07-11 15:02:07 +0200 |
commit | 753dc62267118e44b16653113521fe6d0a360720 (patch) | |
tree | 5f96411a594a61781de9247a68d36ae626b964fb /tests/content_visibility/set_topic_visibility_test.php | |
parent | 9aed758c1397c31b979f4aca51249c73d21bd6f5 (diff) | |
download | forums-753dc62267118e44b16653113521fe6d0a360720.tar forums-753dc62267118e44b16653113521fe6d0a360720.tar.gz forums-753dc62267118e44b16653113521fe6d0a360720.tar.bz2 forums-753dc62267118e44b16653113521fe6d0a360720.tar.xz forums-753dc62267118e44b16653113521fe6d0a360720.zip |
[ticket/9657] Fix unit tests
PHPBB3-9657
Diffstat (limited to 'tests/content_visibility/set_topic_visibility_test.php')
-rw-r--r-- | tests/content_visibility/set_topic_visibility_test.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/content_visibility/set_topic_visibility_test.php b/tests/content_visibility/set_topic_visibility_test.php index 31a6b37caa..3061ba44db 100644 --- a/tests/content_visibility/set_topic_visibility_test.php +++ b/tests/content_visibility/set_topic_visibility_test.php @@ -79,12 +79,14 @@ class phpbb_content_visibility_set_topic_visibility_test extends phpbb_database_ */ public function test_set_topic_visibility($visibility, $topic_id, $forum_id, $user_id, $time, $reason, $force_update_all, $expected_posts, $expected_topic) { - global $cache, $db; + global $cache, $db, $auth, $phpbb_root_path, $phpEx; $cache = new phpbb_mock_cache; $db = $this->new_dbal(); + $auth = $this->getMock('phpbb_auth'); + $content_visibility = new phpbb_content_visibility($auth, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE); - phpbb_content_visibility::set_topic_visibility($visibility, $topic_id, $forum_id, $user_id, $time, $reason, $force_update_all); + $content_visibility->set_topic_visibility($visibility, $topic_id, $forum_id, $user_id, $time, $reason, $force_update_all); $result = $db->sql_query('SELECT post_id, post_visibility, post_delete_reason FROM phpbb_posts |