public function ResponseTest::testPrepareRemovesContentLength 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::testPrepareRemovesContentLength()
File
- vendor/
symfony/ http-foundation/ Tests/ ResponseTest.php, line 528
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testPrepareRemovesContentLength() {
$response = new Response('foo');
$request = Request::create('/');
$response->headers
->set('Content-Length', 12345);
$response
->prepare($request);
$this
->assertEquals(12345, $response->headers
->get('Content-Length'));
$response->headers
->set('Transfer-Encoding', 'chunked');
$response
->prepare($request);
$this
->assertFalse($response->headers
->has('Content-Length'));
}