mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 20:13:22 +01:00
Merge pull request #2626 from dhruvgoel92/ticket/12746
[ticket/12746] Init phpbb_dispatcher being used by delete_post() * dhruvgoel92/ticket/12746: [ticket/12746] Init phpbb_dispatcher being used by delete_post()
This commit is contained in:
commit
a5ca7479b2
@ -266,7 +266,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)
|
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_container, $phpbb_dispatcher, $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
$config['search_type'] = 'phpbb_mock_search';
|
$config['search_type'] = 'phpbb_mock_search';
|
||||||
$cache = new phpbb_mock_cache;
|
$cache = new phpbb_mock_cache;
|
||||||
@ -283,6 +283,8 @@ class phpbb_content_visibility_delete_post_test extends phpbb_database_test_case
|
|||||||
)));
|
)));
|
||||||
$user = $this->getMock('\phpbb\user');
|
$user = $this->getMock('\phpbb\user');
|
||||||
|
|
||||||
|
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
|
||||||
|
|
||||||
$phpbb_container = new phpbb_mock_container_builder();
|
$phpbb_container = new phpbb_mock_container_builder();
|
||||||
$phpbb_container->set('notification_manager', new phpbb_mock_notification_manager());
|
$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, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user