You are here

public function HttpCacheTest::testDoesNotCacheWithAuthorizationRequestHeaderAndNonPublicResponse in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php \Symfony\Component\HttpKernel\Tests\HttpCache\HttpCacheTest::testDoesNotCacheWithAuthorizationRequestHeaderAndNonPublicResponse()

File

vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php, line 73

Class

HttpCacheTest

Namespace

Symfony\Component\HttpKernel\Tests\HttpCache

Code

public function testDoesNotCacheWithAuthorizationRequestHeaderAndNonPublicResponse() {
  $this
    ->setNextResponse(200, array(
    'ETag' => '"Foo"',
  ));
  $this
    ->request('GET', '/', array(
    'HTTP_AUTHORIZATION' => 'basic foobarbaz',
  ));
  $this
    ->assertHttpKernelIsCalled();
  $this
    ->assertResponseOk();
  $this
    ->assertEquals('private', $this->response->headers
    ->get('Cache-Control'));
  $this
    ->assertTraceContains('miss');
  $this
    ->assertTraceNotContains('store');
  $this
    ->assertFalse($this->response->headers
    ->has('Age'));
}