You are here

public function AppendStreamTest::testDetachesEachStream in Zircon Profile 8.0

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

File

vendor/guzzlehttp/psr7/tests/AppendStreamTest.php, line 75

Class

AppendStreamTest

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testDetachesEachStream() {
  $s1 = Psr7\stream_for('foo');
  $s2 = Psr7\stream_for('bar');
  $a = new AppendStream([
    $s1,
    $s2,
  ]);
  $this
    ->assertSame('foobar', (string) $a);
  $a
    ->detach();
  $this
    ->assertSame('', (string) $a);
  $this
    ->assertSame(0, $a
    ->getSize());
}