mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/17496] Fix tests
PHPBB-17496
This commit is contained in:
parent
c6dcf474d3
commit
0f94e1cb13
1 changed files with 3 additions and 2 deletions
|
@ -24,6 +24,7 @@ use phpbb\template\template;
|
|||
use phpbb\user;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Psr7\Response;
|
||||
use GuzzleHttp\Psr7\Utils;
|
||||
|
||||
require_once __DIR__ . '/../../phpBB/includes/functions_acp.php';
|
||||
|
||||
|
@ -266,7 +267,7 @@ class phpbb_captcha_turnstile_test extends \phpbb_database_test_case
|
|||
$response_mock = $this->createMock(Response::class);
|
||||
|
||||
$client_mock->method('request')->willReturn($response_mock);
|
||||
$response_mock->method('getBody')->willReturn(json_encode(['success' => true]));
|
||||
$response_mock->method('getBody')->willReturn(Utils::streamFor(json_encode(['success' => true])));
|
||||
|
||||
// Mock config values for secret
|
||||
$this->config->method('offsetGet')->willReturn('secret_value');
|
||||
|
@ -354,7 +355,7 @@ class phpbb_captcha_turnstile_test extends \phpbb_database_test_case
|
|||
$response_mock = $this->createMock(Response::class);
|
||||
|
||||
$client_mock->method('request')->willReturn($response_mock);
|
||||
$response_mock->method('getBody')->willReturn(json_encode(['success' => false]));
|
||||
$response_mock->method('getBody')->willReturn(Utils::streamFor(json_encode(['success' => false])));
|
||||
|
||||
// Mock config values for secret
|
||||
$this->config->method('offsetGet')->willReturn('secret_value');
|
||||
|
|
Loading…
Add table
Reference in a new issue