Skip to content

Commit 3ada8eb

Browse files
committed
Ensure Request emits initial Response data as string
1 parent f2b902a commit 3ada8eb

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
@@ -156,7 +156,7 @@ public function handleData($data)
156156

157157
$this->emit('response', array($response, $this));
158158

159-
$response->emit('data', array($bodyChunk, $response));
159+
$response->emit('data', array((string)$bodyChunk, $response));
160160
}
161161
}
162162

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)