You are here

public function EsiTest::testAddSurrogateControl in Zircon Profile 8

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

File

vendor/symfony/http-kernel/Tests/HttpCache/EsiTest.php, line 48

Class

EsiTest

Namespace

Symfony\Component\HttpKernel\Tests\HttpCache

Code

public function testAddSurrogateControl() {
  $esi = new Esi();
  $response = new Response('foo <esi:include src="" />');
  $esi
    ->addSurrogateControl($response);
  $this
    ->assertEquals('content="ESI/1.0"', $response->headers
    ->get('Surrogate-Control'));
  $response = new Response('foo');
  $esi
    ->addSurrogateControl($response);
  $this
    ->assertEquals('', $response->headers
    ->get('Surrogate-Control'));
}