aboutsummaryrefslogtreecommitdiffstats
path: root/tests/content_visibility/delete_post_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/content_visibility/delete_post_test.php')
-rw-r--r--tests/content_visibility/delete_post_test.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/content_visibility/delete_post_test.php b/tests/content_visibility/delete_post_test.php
index e7ab3e3879..6234aac9ad 100644
--- a/tests/content_visibility/delete_post_test.php
+++ b/tests/content_visibility/delete_post_test.php
@@ -262,16 +262,13 @@ class phpbb_content_visibility_delete_post_test extends phpbb_database_test_case
*/
public function test_delete_post($forum_id, $topic_id, $post_id, $data, $is_soft, $reason, $expected_posts, $expected_topic, $expected_forum)
{
- global $auth, $cache, $config, $db, $phpbb_container;
+ global $auth, $cache, $config, $db, $phpbb_container, $phpbb_root_path, $phpEx;
$config['search_type'] = 'phpbb_mock_search';
$cache = new phpbb_mock_cache;
$db = $this->new_dbal();
set_config_count(null, null, null, new phpbb_config(array('num_posts' => 3, 'num_topics' => 1)));
- $phpbb_container = new phpbb_mock_container_builder();
- $phpbb_container->set('notification_manager', new phpbb_mock_notification_manager());
-
// Create auth mock
$auth = $this->getMock('phpbb_auth');
$auth->expects($this->any())
@@ -280,6 +277,11 @@ class phpbb_content_visibility_delete_post_test extends phpbb_database_test_case
->will($this->returnValueMap(array(
array('m_approve', 1, true),
)));
+ $user = $this->getMock('phpbb_user');
+
+ $phpbb_container = new phpbb_mock_container_builder();
+ $phpbb_container->set('notification_manager', new phpbb_mock_notification_manager());
+ $phpbb_container->set('content.visibility', new phpbb_content_visibility($auth, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE));
delete_post($forum_id, $topic_id, $post_id, $data, $is_soft, $reason);