1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-07 23:16:13 +02:00

[ticket/15886] Mock path helper in group helper tests

PHPBB3-15886
This commit is contained in:
mrgoldy 2019-01-02 12:33:25 +01:00
parent 50cec4d54c
commit f023dd590f

View File

@ -99,16 +99,16 @@ class phpbb_group_helper_test_case extends phpbb_test_case
$phpbb_dispatcher = new phpbb_mock_event_dispatcher(); $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
// Set up path helper // Set up path helper
$filesystem = new \phpbb\filesystem\filesystem(); $path_helper = $this->getMockBuilder('\phpbb\path_helper')
$path_helper = new \phpbb\path_helper( ->disableOriginalConstructor()
new \phpbb\symfony_request( ->setMethods(array())
new phpbb_mock_request() ->getMock();
), $path_helper->method('get_phpbb_root_path')
$filesystem, ->willReturn($phpbb_root_path);
$this->getMock('\phpbb\request\request'), $path_helper->method('get_php_ext')
$phpbb_root_path, ->willReturn($phpEx);
$phpEx $path_helper->method('update_web_root_path')
); ->will($this->returnArgument(0));
$user = new \phpbb\user($lang, '\phpbb\datetime'); $user = new \phpbb\user($lang, '\phpbb\datetime');
$user->data['user_id'] = ANONYMOUS; $user->data['user_id'] = ANONYMOUS;