You are here

public function NoSeekStreamTest::testHandlesClose in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/psr7/tests/NoSeekStreamTest.php \GuzzleHttp\Tests\Psr7\NoSeekStreamTest::testHandlesClose()

@expectedException \RuntimeException @expectedExceptionMessage Cannot write to a non-writable stream

File

vendor/guzzlehttp/psr7/tests/NoSeekStreamTest.php, line 33

Class

NoSeekStreamTest
@covers GuzzleHttp\Psr7\NoSeekStream @covers GuzzleHttp\Psr7\StreamDecoratorTrait

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testHandlesClose() {
  $s = Psr7\stream_for('foo');
  $wrapped = new NoSeekStream($s);
  $wrapped
    ->close();
  $wrapped
    ->write('foo');
}