Skip to content

Commit 31f31ed

Browse files
mmelvin0WyriHaximus
authored andcommitted
Ensure Request emits initial Response data as string (#66)
1 parent f2b902a commit 31f31ed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ protected function parseResponse($data)
222222
$headers
223223
);
224224

225-
return array($response, $psrResponse->getBody());
225+
return array($response, (string)($psrResponse->getBody()));
226226
}
227227

228228
protected function connect()

tests/RequestTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function requestShouldBindToStreamEventsAndUseconnector()
7373

7474
$response->expects($this->once())
7575
->method('emit')
76-
->with('data', array('body', $response));
76+
->with('data', $this->identicalTo(array('body', $response)));
7777

7878
$response->expects($this->at(0))
7979
->method('on')

0 commit comments

Comments
 (0)