public function HttpCacheTest::testDoesCacheWithAuthorizationRequestHeaderAndPublicResponse

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php, line 100

Class

HttpCacheTest

Namespace

Symfony\Component\HttpKernel\Tests\HttpCache

Code

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