[ticket/17153] Use mocked user class in extension test

PHPBB3-17153
This commit is contained in:
Marc Alexander 2023-07-01 20:29:16 +02:00
parent ad7721368c
commit c495a26f98
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -32,7 +32,7 @@ class phpbb_template_extension_test extends phpbb_template_template_test_case
$this->user->style['style_parent_id'] = 0;
global $auth, $request, $symfony_request, $user;
$user = new phpbb_mock_user();
$user = $this->createMock(\phpbb\user::class);
$user->optionset('user_id', 2);
$user->style['style_path'] = '';
$user->data['user_id'] = 2;
@ -92,7 +92,7 @@ class phpbb_template_extension_test extends phpbb_template_template_test_case
$lang,
$phpbb_container->get('avatar.manager'),
$phpbb_path_helper,
new \phpbb\user($lang, '\phpbb\datetime')
$user
);
$this->template_path = $this->test_path . '/templates';