1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-25 19:11:47 +02:00

[ticket/12479] Use separate mock in "remote" file test

PHPBB-12479
This commit is contained in:
Marc Alexander
2024-07-23 21:25:22 +02:00
parent efff5ac49e
commit ca56181008

View File

@@ -257,11 +257,11 @@ class version_helper_remote_test extends \phpbb_test_case
public function test_version_phpbb_com()
{
$this->guzzle_mock = $this->getMockBuilder('\GuzzleHttp\Client')
$guzzle_mock = $this->getMockBuilder('\GuzzleHttp\Client')
->onlyMethods(['request'])
->getMock();
$this->guzzle_mock->method('request')
$guzzle_mock->method('request')
->will($this->returnCallback(function()
{
return new \GuzzleHttp\Psr7\Response(200, [], file_get_contents(__DIR__ . '/fixture/30x.txt'));
@@ -273,7 +273,7 @@ class version_helper_remote_test extends \phpbb_test_case
->getMock();
$file_downloader->method('create_client')
->willReturn($this->guzzle_mock);
->willReturn($guzzle_mock);
$hostname = 'version.phpbb.com';