mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 11:58:51 +00:00
[ticket/17496] Fix tests
PHPUnit will automatically create a test double of required return type to be returned PHPBB-17496
This commit is contained in:
parent
118ab73c37
commit
d0cb7d6389
1 changed files with 2 additions and 3 deletions
|
@ -68,8 +68,7 @@ class phpbb_update_get_updates_test extends phpbb_test_case
|
|||
->with('GET', 'http://example.com/update.zip', [
|
||||
'sink' => '/path/to/storage',
|
||||
'allow_redirects' => false
|
||||
])
|
||||
->willReturn(true);
|
||||
]);
|
||||
|
||||
$client_reflection = new \ReflectionProperty($this->update, 'http_client');
|
||||
$client_reflection->setValue($this->update, $this->http_client);
|
||||
|
@ -84,7 +83,7 @@ class phpbb_update_get_updates_test extends phpbb_test_case
|
|||
->method('request')
|
||||
->willReturnCallback(function ($method, $url, $options)
|
||||
{
|
||||
throw new ClientException('bad client', new \GuzzleHttp\Psr7\Request($method, $url));
|
||||
throw new ClientException('bad client', new \GuzzleHttp\Psr7\Request($method, $url), new \GuzzleHttp\Psr7\Response());
|
||||
});
|
||||
$client_reflection = new \ReflectionProperty($this->update, 'http_client');
|
||||
$client_reflection->setValue($this->update, $this->http_client);
|
||||
|
|
Loading…
Add table
Reference in a new issue