mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/9657] Fix unit tests missing global container.
PHPBB3-9657
This commit is contained in:
parent
9bddf73d31
commit
1a17a3854f
1 changed files with 4 additions and 1 deletions
|
@ -262,13 +262,16 @@ 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)
|
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;
|
global $auth, $cache, $config, $db, $phpbb_container;
|
||||||
|
|
||||||
$config['search_type'] = 'phpbb_mock_search';
|
$config['search_type'] = 'phpbb_mock_search';
|
||||||
$cache = new phpbb_mock_cache;
|
$cache = new phpbb_mock_cache;
|
||||||
$db = $this->new_dbal();
|
$db = $this->new_dbal();
|
||||||
set_config_count(null, null, null, new phpbb_config(array('num_posts' => 3, 'num_topics' => 1)));
|
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
|
// Create auth mock
|
||||||
$auth = $this->getMock('phpbb_auth');
|
$auth = $this->getMock('phpbb_auth');
|
||||||
$auth->expects($this->any())
|
$auth->expects($this->any())
|
||||||
|
|
Loading…
Add table
Reference in a new issue