You are here

public function SsiTest::testHasSurrogateSsiCapability 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::testHasSurrogateSsiCapability()

File

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

Class

SsiTest

Namespace

Symfony\Component\HttpKernel\Tests\HttpCache

Code

public function testHasSurrogateSsiCapability() {
  $ssi = new Ssi();
  $request = Request::create('/');
  $request->headers
    ->set('Surrogate-Capability', 'abc="SSI/1.0"');
  $this
    ->assertTrue($ssi
    ->hasSurrogateCapability($request));
  $request = Request::create('/');
  $request->headers
    ->set('Surrogate-Capability', 'foobar');
  $this
    ->assertFalse($ssi
    ->hasSurrogateCapability($request));
  $request = Request::create('/');
  $this
    ->assertFalse($ssi
    ->hasSurrogateCapability($request));
}