You are here

public function SsiTest::testAddSurrogateControl in Zircon Profile 8

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

File

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

Class

SsiTest

Namespace

Symfony\Component\HttpKernel\Tests\HttpCache

Code

public function testAddSurrogateControl() {
  $ssi = new Ssi();
  $response = new Response('foo <!--#include virtual="" -->');
  $ssi
    ->addSurrogateControl($response);
  $this
    ->assertEquals('content="SSI/1.0"', $response->headers
    ->get('Surrogate-Control'));
  $response = new Response('foo');
  $ssi
    ->addSurrogateControl($response);
  $this
    ->assertEquals('', $response->headers
    ->get('Surrogate-Control'));
}