You are here

public function StreamTest::testChecksEof in Zircon Profile 8.0

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

File

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

Class

StreamTest
@covers GuzzleHttp\Psr7\Stream

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testChecksEof() {
  $handle = fopen('php://temp', 'w+');
  fwrite($handle, 'data');
  $stream = new Stream($handle);
  $this
    ->assertFalse($stream
    ->eof());
  $stream
    ->read(4);
  $this
    ->assertTrue($stream
    ->eof());
  $stream
    ->close();
}