protected function DrupalTestBrowser::createResponse in Drupal 9
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.
1 call to DrupalTestBrowser::createResponse()
- DrupalTestBrowser::doRequest in core/
tests/ Drupal/ Tests/ DrupalTestBrowser.php
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());
}