Skip to content

Commit

Permalink
Fix the search index subscriber test (see #2003)
Browse files Browse the repository at this point in the history
Description
-----------

Backport of #2000.

Commits
-------

ae7d011 Fix the search index subscriber test
  • Loading branch information
leofeyer committed Jul 27, 2020
1 parent 87cc286 commit 944497d
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,20 @@ private function getResponse(bool $asHtml, int $statusCode = 200): ResponseInter

$response
->method('getInfo')
->with('response_headers')
->willReturn([])
->willReturnCallback(
static function (string $key) use ($statusCode) {
switch ($key) {
case 'http_code':
return $statusCode;

case 'response_headers':
return [];

default:
return null;
}
}
)
;

return $response;
Expand Down

0 comments on commit 944497d

Please sign in to comment.