We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92ef823 commit 76c64eeCopy full SHA for 76c64ee
src/StreamIntegrationTest.php
@@ -301,4 +301,21 @@ public function testGetContents()
301
$this->assertEquals('def', $stream->getContents());
302
$this->assertSame('', $stream->getContents());
303
}
304
+
305
+ public function testGetContentsError()
306
+ {
307
+ if (isset($this->skippedTests[__FUNCTION__])) {
308
+ $this->markTestSkipped($this->skippedTests[__FUNCTION__]);
309
+ }
310
311
+ $resource = fopen('php://memory', 'rw');
312
+ fwrite($resource, 'abcdef');
313
+ rewind($resource);
314
+ $stream = $this->createStream($resource);
315
316
+ fclose($resource);
317
318
+ $this->expectException(\RuntimeException::class);
319
+ $stream->getContents();
320
321
0 commit comments