public function RequestTest::testGetContentReturnsResourceWhenContentSetInConstructor 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::testGetContentReturnsResourceWhenContentSetInConstructor()
File
- vendor/
symfony/ http-foundation/ Tests/ RequestTest.php, line 972
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testGetContentReturnsResourceWhenContentSetInConstructor() {
$req = new Request(array(), array(), array(), array(), array(), array(), 'MyContent');
$resource = $req
->getContent(true);
$this
->assertTrue(is_resource($resource));
$this
->assertEquals('MyContent', stream_get_contents($resource));
}