diff options
| author | Nathan Guse <nathaniel.guse@gmail.com> | 2013-09-09 18:47:25 -0500 |
|---|---|---|
| committer | Nathan Guse <nathaniel.guse@gmail.com> | 2013-09-09 18:47:25 -0500 |
| commit | 5e09afa0bc3ff9014812282fd4454f0df54b9dfd (patch) | |
| tree | 11df0dc0628260e2f5dd3381218c602607611477 /tests/content_visibility/delete_post_test.php | |
| parent | 289bc2a411aac4f0adb9b7b649dfd9ef073eaed9 (diff) | |
| download | forums-5e09afa0bc3ff9014812282fd4454f0df54b9dfd.tar forums-5e09afa0bc3ff9014812282fd4454f0df54b9dfd.tar.gz forums-5e09afa0bc3ff9014812282fd4454f0df54b9dfd.tar.bz2 forums-5e09afa0bc3ff9014812282fd4454f0df54b9dfd.tar.xz forums-5e09afa0bc3ff9014812282fd4454f0df54b9dfd.zip | |
[ticket/11832] Make $phpbb_container a global initiated by the framework
Setup common items needed from the container (e.g. filesystem)
PHPBB3-11832
Diffstat (limited to 'tests/content_visibility/delete_post_test.php')
| -rw-r--r-- | tests/content_visibility/delete_post_test.php | 7 |
1 files changed, 3 insertions, 4 deletions
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); |
