From c495a26f98ecbf776a08b3a5282d1ee9a543ce3f Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 1 Jul 2023 20:29:16 +0200 Subject: [PATCH] [ticket/17153] Use mocked user class in extension test PHPBB3-17153 --- tests/template/extension_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/template/extension_test.php b/tests/template/extension_test.php index 8295a613a0..5caae111ca 100644 --- a/tests/template/extension_test.php +++ b/tests/template/extension_test.php @@ -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';