mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-30 19:49:54 +02:00
[ticket/9657] Fix unit tests
PHPBB3-9657
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user