You are here

public function BufferStreamTest::testRemovesReadDataFromBuffer in Zircon Profile 8

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

File

vendor/guzzlehttp/psr7/tests/BufferStreamTest.php, line 19

Class

BufferStreamTest

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testRemovesReadDataFromBuffer() {
  $b = new BufferStream();
  $this
    ->assertEquals(3, $b
    ->write('foo'));
  $this
    ->assertEquals(3, $b
    ->getSize());
  $this
    ->assertFalse($b
    ->eof());
  $this
    ->assertEquals('foo', $b
    ->read(10));
  $this
    ->assertTrue($b
    ->eof());
  $this
    ->assertEquals('', $b
    ->read(10));
}