mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 05:48:51 +00:00
[ticket/13713] Resolve issues with PHPUnit calls in PHP >= 8.0
PHPBB3-13713
This commit is contained in:
parent
a271d0cacb
commit
640444c8d7
2 changed files with 10 additions and 11 deletions
|
@ -668,16 +668,15 @@ class phpbb_mention_controller_test extends phpbb_database_test_case
|
||||||
*/
|
*/
|
||||||
public function test_handle($keyword, $topic_id, $expected_result)
|
public function test_handle($keyword, $topic_id, $expected_result)
|
||||||
{
|
{
|
||||||
$this->request->expects($this->at(1))
|
$this->request->expects($this->atLeast(2))
|
||||||
->method('variable')
|
->method('variable')
|
||||||
->with('keyword', '', true)
|
->withConsecutive(
|
||||||
->willReturn($keyword)
|
['keyword', '', true],
|
||||||
;
|
['topic_id', 0])
|
||||||
$this->request->expects($this->at(2))
|
->willReturnOnConsecutiveCalls(
|
||||||
->method('variable')
|
$keyword,
|
||||||
->with('topic_id', 0)
|
$topic_id
|
||||||
->willReturn($topic_id)
|
);
|
||||||
;
|
|
||||||
$data = json_decode($this->controller->handle()->getContent(), true);
|
$data = json_decode($this->controller->handle()->getContent(), true);
|
||||||
$this->assertEquals($expected_result, $data);
|
$this->assertEquals($expected_result, $data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,7 +96,7 @@ class mention_helper_test extends phpbb_database_test_case
|
||||||
public function test_inject_metadata($incoming_xml, $expected_profile_substring)
|
public function test_inject_metadata($incoming_xml, $expected_profile_substring)
|
||||||
{
|
{
|
||||||
$result = $this->mention_helper->inject_metadata($incoming_xml);
|
$result = $this->mention_helper->inject_metadata($incoming_xml);
|
||||||
$this->assertContains($expected_profile_substring, $result);
|
$this->assertStringContainsString($expected_profile_substring, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get_mentioned_user_ids_data()
|
public function get_mentioned_user_ids_data()
|
||||||
|
|
Loading…
Add table
Reference in a new issue