1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-13 04:04:12 +02:00

[ticket/13713] Resolve issues with PHPUnit calls in PHP >= 8.0

PHPBB3-13713
This commit is contained in:
Marc Alexander
2021-01-28 22:27:26 +01:00
parent a271d0cacb
commit 640444c8d7
2 changed files with 10 additions and 11 deletions

View File

@@ -668,16 +668,15 @@ class phpbb_mention_controller_test extends phpbb_database_test_case
*/
public function test_handle($keyword, $topic_id, $expected_result)
{
$this->request->expects($this->at(1))
->method('variable')
->with('keyword', '', true)
->willReturn($keyword)
;
$this->request->expects($this->at(2))
->method('variable')
->with('topic_id', 0)
->willReturn($topic_id)
;
$this->request->expects($this->atLeast(2))
->method('variable')
->withConsecutive(
['keyword', '', true],
['topic_id', 0])
->willReturnOnConsecutiveCalls(
$keyword,
$topic_id
);
$data = json_decode($this->controller->handle()->getContent(), true);
$this->assertEquals($expected_result, $data);
}