You are here

public function FunctionsTest::testFactoryCreatesFromResource in Zircon Profile 8

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

File

vendor/guzzlehttp/psr7/tests/FunctionsTest.php, line 372

Class

FunctionsTest

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testFactoryCreatesFromResource() {
  $r = fopen(__FILE__, 'r');
  $s = Psr7\stream_for($r);
  $this
    ->assertInstanceOf('GuzzleHttp\\Psr7\\Stream', $s);
  $this
    ->assertSame(file_get_contents(__FILE__), (string) $s);
}