You are here

public function LimitStreamTest::testReturnsNullIfSizeCannotBeDetermined in Zircon Profile 8.0

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

File

vendor/guzzlehttp/psr7/tests/LimitStreamTest.php, line 150

Class

LimitStreamTest
@covers GuzzleHttp\Psr7\LimitStream

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testReturnsNullIfSizeCannotBeDetermined() {
  $a = new FnStream([
    'getSize' => function () {
      return null;
    },
    'tell' => function () {
      return 0;
    },
  ]);
  $b = new LimitStream($a);
  $this
    ->assertNull($b
    ->getSize());
}