You are here

public function StreamTest::testCloseClearProperties in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/guzzlehttp/psr7/tests/StreamTest.php \GuzzleHttp\Tests\Psr7\StreamTest::testCloseClearProperties()

File

vendor/guzzlehttp/psr7/tests/StreamTest.php, line 142

Class

StreamTest
@covers GuzzleHttp\Psr7\Stream

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testCloseClearProperties() {
  $handle = fopen('php://temp', 'r+');
  $stream = new Stream($handle);
  $stream
    ->close();
  $this
    ->assertFalse($stream
    ->isSeekable());
  $this
    ->assertFalse($stream
    ->isReadable());
  $this
    ->assertFalse($stream
    ->isWritable());
  $this
    ->assertNull($stream
    ->getSize());
  $this
    ->assertEmpty($stream
    ->getMetadata());
}