You are here

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

File

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

Class

SsiTest

Namespace

Symfony\Component\HttpKernel\Tests\HttpCache

Code

public function testProcess() {
  $ssi = new Ssi();
  $request = Request::create('/');
  $response = new Response('foo <!--#include virtual="..." -->');
  $ssi
    ->process($request, $response);
  $this
    ->assertEquals('foo <?php echo $this->surrogate->handle($this, \'...\', \'\', false) ?>' . "\n", $response
    ->getContent());
  $this
    ->assertEquals('SSI', $response->headers
    ->get('x-body-eval'));
  $response = new Response('foo <!--#include virtual="foo\'" -->');
  $ssi
    ->process($request, $response);
  $this
    ->assertEquals("foo <?php echo \$this->surrogate->handle(\$this, 'foo\\'', '', false) ?>" . "\n", $response
    ->getContent());
}