1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 08:47:45 +02:00

[ticket/17535] Fix tests PHP deprecations and notices

PHPBB-17535
This commit is contained in:
rxu
2025-07-18 11:00:58 +07:00
parent 8a99024087
commit 902c99bc0c
36 changed files with 193 additions and 111 deletions

View File

@@ -60,14 +60,15 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
);
$user->style = array('style_id' => 1);
$user->lang = array(
'NO_POLL_TITLE' => 'You have to enter a poll title.',
'POLL_TITLE_TOO_LONG' => 'The poll title must contain fewer than 100 characters.',
'POLL_TITLE_COMP_TOO_LONG' => 'The parsed size of your poll title is too large, consider removing BBCodes or smilies.',
'TOO_FEW_POLL_OPTIONS' => 'You must enter at least two poll options.',
'TOO_MANY_POLL_OPTIONS' => 'You have tried to enter too many poll options.',
'TOO_MANY_USER_OPTIONS' => 'You cannot specify more options per user than existing poll options.',
);
$user->expects($this->any())
-> method('__get')->with('lang')->willReturn([
'NO_POLL_TITLE' => 'You have to enter a poll title.',
'POLL_TITLE_TOO_LONG' => 'The poll title must contain fewer than 100 characters.',
'POLL_TITLE_COMP_TOO_LONG' => 'The parsed size of your poll title is too large, consider removing BBCodes or smilies.',
'TOO_FEW_POLL_OPTIONS' => 'You must enter at least two poll options.',
'TOO_MANY_POLL_OPTIONS' => 'You have tried to enter too many poll options.',
'TOO_MANY_USER_OPTIONS' => 'You cannot specify more options per user than existing poll options.',
]);
$phpbb_container = new phpbb_mock_container_builder;
$phpbb_container->set('user', $user);