You are here

public function PumpStreamTest::testHasMetadataAndSize in Zircon Profile 8

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

File

vendor/guzzlehttp/psr7/tests/PumpStreamTest.php, line 10

Class

PumpStreamTest

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testHasMetadataAndSize() {
  $p = new PumpStream(function () {
  }, [
    'metadata' => [
      'foo' => 'bar',
    ],
    'size' => 100,
  ]);
  $this
    ->assertEquals('bar', $p
    ->getMetadata('foo'));
  $this
    ->assertEquals([
    'foo' => 'bar',
  ], $p
    ->getMetadata());
  $this
    ->assertEquals(100, $p
    ->getSize());
}