Skip to content
Snippets Groups Projects
Verified Commit 6b1c5e3d authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3292980 by benjifisher, mikelutz, quietone: Testing system should...

Issue #3292980 by benjifisher, mikelutz, quietone: Testing system should explain why Guzzle responses can be unreadable
parent d8d13be9
No related branches found
No related tags found
No related merge requests found
...@@ -182,7 +182,9 @@ protected function getResponseLogHandler() { ...@@ -182,7 +182,9 @@ protected function getResponseLogHandler() {
/** @var \Psr\Http\Message\StreamInterface $stream */ /** @var \Psr\Http\Message\StreamInterface $stream */
$stream = $response->getBody(); $stream = $response->getBody();
// Get the response body as a string. // Get the response body as a string. The response stream is set
// to the sink, which defaults to a readable temp stream but can
// be overridden by setting $options['sink'].
$body = $stream->isReadable() $body = $stream->isReadable()
? (string) $stream ? (string) $stream
: 'Response is not readable.'; : 'Response is not readable.';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment