public function ResponseTest::testPrepareSetsPragmaOnHttp10Only 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::testPrepareSetsPragmaOnHttp10Only()
File
- vendor/
symfony/ http-foundation/ Tests/ ResponseTest.php, line 542
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testPrepareSetsPragmaOnHttp10Only() {
$request = Request::create('/', 'GET');
$request->server
->set('SERVER_PROTOCOL', 'HTTP/1.0');
$response = new Response('foo');
$response
->prepare($request);
$this
->assertEquals('no-cache', $response->headers
->get('pragma'));
$this
->assertEquals('-1', $response->headers
->get('expires'));
$request->server
->set('SERVER_PROTOCOL', 'HTTP/1.1');
$response = new Response('foo');
$response
->prepare($request);
$this
->assertFalse($response->headers
->has('pragma'));
$this
->assertFalse($response->headers
->has('expires'));
}