public function RequestTest::testContentAsResource in Zircon Profile 8
Same name and namespace in other branches
- 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
Namespace
Symfony\Component\HttpFoundation\TestsCode
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());
}