You are here

public function BufferStreamTest::testExceedingHighwaterMarkReturnsFalseButStillBuffers in Zircon Profile 8

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

File

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

Class

BufferStreamTest

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testExceedingHighwaterMarkReturnsFalseButStillBuffers() {
  $b = new BufferStream(5);
  $this
    ->assertEquals(3, $b
    ->write('hi '));
  $this
    ->assertFalse($b
    ->write('hello'));
  $this
    ->assertEquals('hi hello', (string) $b);
  $this
    ->assertEquals(4, $b
    ->write('test'));
}