protected function DrupalTestBrowser::createResponse in Drupal 10
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/DrupalTestBrowser.php \Drupal\Tests\DrupalTestBrowser::createResponse()
Converts a Guzzle response to a BrowserKit response.
Parameters
\Psr\Http\Message\ResponseInterface $response: The Guzzle response.
Return value
\Symfony\Component\BrowserKit\Response A BrowserKit Response instance.
File
- core/
tests/ Drupal/ Tests/ DrupalTestBrowser.php, line 238
Class
- DrupalTestBrowser
- Enables a BrowserKitDriver mink driver to use a Guzzle client.
Namespace
Drupal\TestsCode
protected function createResponse(ResponseInterface $response) {
return new Response((string) $response
->getBody(), $response
->getStatusCode(), $response
->getHeaders());
}