public function ResponseTest::testPrepareRemovesContentForInformationalResponse in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/ResponseTest.php \Symfony\Component\HttpFoundation\Tests\ResponseTest::testPrepareRemovesContentForInformationalResponse()
File
- vendor/
symfony/ http-foundation/ Tests/ ResponseTest.php, line 508
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testPrepareRemovesContentForInformationalResponse() {
$response = new Response('foo');
$request = Request::create('/');
$response
->setContent('content');
$response
->setStatusCode(101);
$response
->prepare($request);
$this
->assertEquals('', $response
->getContent());
$this
->assertFalse($response->headers
->has('Content-Type'));
$this
->assertFalse($response->headers
->has('Content-Type'));
$response
->setContent('content');
$response
->setStatusCode(304);
$response
->prepare($request);
$this
->assertEquals('', $response
->getContent());
$this
->assertFalse($response->headers
->has('Content-Type'));
$this
->assertFalse($response->headers
->has('Content-Length'));
}