public function EsiTest::testNeedsEsiParsing

File

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

Class

EsiTest

Namespace

Symfony\Component\HttpKernel\Tests\HttpCache

Code

public function testNeedsEsiParsing() {
  $esi = new Esi();
  $response = new Response();
  $response->headers
    ->set('Surrogate-Control', 'content="ESI/1.0"');
  $this
    ->assertTrue($esi
    ->needsEsiParsing($response));
  $response = new Response();
  $this
    ->assertFalse($esi
    ->needsEsiParsing($response));
}