1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-30 19:49:54 +02:00

Merge pull request #2623 from dhruvgoel92/ticket/12738

[ticket/12738] Move related code from functions_posting to function

* dhruvgoel92/ticket/12738:
  [ticket/12738] Update constructor docblock
  [ticket/12738] Add $config to constructor in notification test
  [ticket/12738] Fix tests with new config object injection
  [ticket/12738] Inject config object into content_visibility class
  [ticket/11528] Move related code from functions_posting to function
This commit is contained in:
Tristan Darricau
2014-08-07 16:44:49 +02:00
10 changed files with 50 additions and 34 deletions

View File

@@ -271,7 +271,8 @@ class phpbb_content_visibility_delete_post_test extends phpbb_database_test_case
$config['search_type'] = 'phpbb_mock_search';
$cache = new phpbb_mock_cache;
$db = $this->new_dbal();
set_config_count(null, null, null, new \phpbb\config\config(array('num_posts' => 3, 'num_topics' => 1)));
$phpbb_config = new \phpbb\config\config(array('num_posts' => 3, 'num_topics' => 1));
set_config_count(null, null, null, $phpbb_config);
// Create auth mock
$auth = $this->getMock('\phpbb\auth\auth');
@@ -287,7 +288,7 @@ class phpbb_content_visibility_delete_post_test extends phpbb_database_test_case
$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));
$phpbb_container->set('content.visibility', new \phpbb\content_visibility($auth, $phpbb_config, $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);