You are here

protected function TestClient::getScript in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/browser-kit/Tests/ClientTest.php \Symfony\Component\BrowserKit\Tests\TestClient::getScript()
  2. 8 vendor/symfony/http-kernel/Tests/Fixtures/TestClient.php \Symfony\Component\HttpKernel\Tests\Fixtures\TestClient::getScript()
Same name and namespace in other branches
  1. 8.0 vendor/symfony/browser-kit/Tests/ClientTest.php \Symfony\Component\BrowserKit\Tests\TestClient::getScript()

Returns the script to execute when the request must be insulated.

Parameters

object $request An origin request instance:

Throws

\LogicException When this abstract class is not implemented

Overrides Client::getScript

File

vendor/symfony/browser-kit/Tests/ClientTest.php, line 59

Class

TestClient

Namespace

Symfony\Component\BrowserKit\Tests

Code

protected function getScript($request) {
  $r = new \ReflectionClass('Symfony\\Component\\BrowserKit\\Response');
  $path = $r
    ->getFileName();
  return <<<EOF
<?php

require_once('{<span class="php-variable">$path</span>}');

echo serialize({<span class="php-variable">$this</span>-&gt;<span class="php-function-or-constant property member-of-self">nextScript</span>});
EOF;
}