protected function TestClient::getScript in Zircon Profile 8
Same name in this branch
- 8 vendor/symfony/browser-kit/Tests/ClientTest.php \Symfony\Component\BrowserKit\Tests\TestClient::getScript()
- 8 vendor/symfony/http-kernel/Tests/Fixtures/TestClient.php \Symfony\Component\HttpKernel\Tests\Fixtures\TestClient::getScript()
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Tests/Fixtures/TestClient.php \Symfony\Component\HttpKernel\Tests\Fixtures\TestClient::getScript()
Returns the script to execute when the request must be insulated.
Parameters
Request $request A Request instance:
Return value
string
Overrides Client::getScript
File
- vendor/
symfony/ http-kernel/ Tests/ Fixtures/ TestClient.php, line 18
Class
Namespace
Symfony\Component\HttpKernel\Tests\FixturesCode
protected function getScript($request) {
$script = parent::getScript($request);
$autoload = file_exists(__DIR__ . '/../../vendor/autoload.php') ? __DIR__ . '/../../vendor/autoload.php' : __DIR__ . '/../../../../../../vendor/autoload.php';
$script = preg_replace('/(\\->register\\(\\);)/', "\$0\nrequire_once '{$autoload}';\n", $script);
return $script;
}