4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\HttpKernel\Tests\Fixtures;
14 use Symfony\Component\HttpKernel\Client;
16 class TestClient extends Client
18 protected function getScript($request)
20 $script = parent::getScript($request);
22 $autoload = file_exists(__DIR__.'/../../vendor/autoload.php')
23 ? __DIR__.'/../../vendor/autoload.php'
24 : __DIR__.'/../../../../../../vendor/autoload.php'
27 $script = preg_replace('/(\->register\(\);)/', "$0\nrequire_once '$autoload';\n", $script);