public function FunctionsTest::testThrowsWhenBodyCannotBeRewound in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/psr7/tests/FunctionsTest.php \GuzzleHttp\Tests\Psr7\FunctionsTest::testThrowsWhenBodyCannotBeRewound()
@expectedException \RuntimeException
File
- vendor/
guzzlehttp/ psr7/ tests/ FunctionsTest.php, line 528
Class
Namespace
GuzzleHttp\Tests\Psr7Code
public function testThrowsWhenBodyCannotBeRewound() {
$body = Psr7\stream_for('abc');
$body
->read(1);
$body = FnStream::decorate($body, [
'rewind' => function () {
throw new \RuntimeException('a');
},
]);
$res = new Psr7\Response(200, [], $body);
Psr7\rewind_body($res);
}