You are here

public function FunctionsTest::testRewindsBody in Zircon Profile 8

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

File

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

Class

FunctionsTest

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testRewindsBody() {
  $body = Psr7\stream_for('abc');
  $res = new Psr7\Response(200, [], $body);
  Psr7\rewind_body($res);
  $this
    ->assertEquals(0, $body
    ->tell());
  $body
    ->rewind(1);
  Psr7\rewind_body($res);
  $this
    ->assertEquals(0, $body
    ->tell());
}