public function EsiTest::testAddSurrogateEsiCapability

File

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

Class

EsiTest

Namespace

Symfony\Component\HttpKernel\Tests\HttpCache

Code

public function testAddSurrogateEsiCapability() {
  $esi = new Esi();
  $request = Request::create('/');
  $esi
    ->addSurrogateEsiCapability($request);
  $this
    ->assertEquals('symfony2="ESI/1.0"', $request->headers
    ->get('Surrogate-Capability'));
  $esi
    ->addSurrogateEsiCapability($request);
  $this
    ->assertEquals('symfony2="ESI/1.0", symfony2="ESI/1.0"', $request->headers
    ->get('Surrogate-Capability'));
}