From 5e09afa0bc3ff9014812282fd4454f0df54b9dfd Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Mon, 9 Sep 2013 18:47:25 -0500 Subject: [ticket/11832] Make $phpbb_container a global initiated by the framework Setup common items needed from the container (e.g. filesystem) PHPBB3-11832 --- tests/content_visibility/delete_post_test.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests/content_visibility/delete_post_test.php') diff --git a/tests/content_visibility/delete_post_test.php b/tests/content_visibility/delete_post_test.php index 6234aac9ad..f5df5e9cba 100644 --- a/tests/content_visibility/delete_post_test.php +++ b/tests/content_visibility/delete_post_test.php @@ -262,7 +262,7 @@ 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, $phpbb_root_path, $phpEx; + global $auth, $cache, $config, $db, $phpbb_root_path, $phpEx; $config['search_type'] = 'phpbb_mock_search'; $cache = new phpbb_mock_cache; @@ -279,9 +279,8 @@ class phpbb_content_visibility_delete_post_test extends phpbb_database_test_case ))); $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)); + $this->phpbb_container->set('notification_manager', new phpbb_mock_notification_manager()); + $this->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); -- cgit v1.2.1