You are here

public function RequestTest::testContentAsResource in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/RequestTest.php \Symfony\Component\HttpFoundation\Tests\RequestTest::testContentAsResource()

File

vendor/symfony/http-foundation/Tests/RequestTest.php, line 981

Class

RequestTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testContentAsResource() {
  $resource = fopen('php://memory', 'r+');
  fwrite($resource, 'My other content');
  rewind($resource);
  $req = new Request(array(), array(), array(), array(), array(), array(), $resource);
  $this
    ->assertEquals('My other content', stream_get_contents($req
    ->getContent(true)));
  $this
    ->assertEquals('My other content', $req
    ->getContent());
}