You are here

public function StreamTest::testGetSize in Zircon Profile 8.0

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

File

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

Class

StreamTest
@covers GuzzleHttp\Psr7\Stream

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testGetSize() {
  $size = filesize(__FILE__);
  $handle = fopen(__FILE__, 'r');
  $stream = new Stream($handle);
  $this
    ->assertEquals($size, $stream
    ->getSize());

  // Load from cache
  $this
    ->assertEquals($size, $stream
    ->getSize());
  $stream
    ->close();
}