Skip to content

Commit

Permalink
Ensure Request emits initial Response data as string (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmelvin0 authored and WyriHaximus committed Oct 19, 2016
1 parent f2b902a commit 31f31ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ protected function parseResponse($data)
$headers
);

return array($response, $psrResponse->getBody());
return array($response, (string)($psrResponse->getBody()));
}

protected function connect()
Expand Down
2 changes: 1 addition & 1 deletion tests/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function requestShouldBindToStreamEventsAndUseconnector()

$response->expects($this->once())
->method('emit')
->with('data', array('body', $response));
->with('data', $this->identicalTo(array('body', $response)));

$response->expects($this->at(0))
->method('on')
Expand Down

0 comments on commit 31f31ed

Please sign in to comment.