merged branch vicb/httpkernel/tests (PR #5985)

This PR was merged into the master branch.

Commits
-------

e32ca2b [HttpKernel] Fix Symfony2 full framework tests

Discussion
----------

[HttpKernel] Fix Symfony2 full framework tests

Fix the path when the full framework is used

---------------------------------------------------------------------------

by fabpot at 2012-11-12T09:08:06Z

When is it broken?

---------------------------------------------------------------------------

by vicb at 2012-11-12T09:18:01Z

now, https://travis-ci.org/symfony/symfony/jobs/3159326
This commit is contained in:
Fabien Potencier 2012-11-12 10:30:29 +01:00
commit 99ee736b2b

View File

@ -19,7 +19,12 @@ class TestClient extends Client
{
$script = parent::getScript($request);
$script = preg_replace('/(\->register\(\);)/', "$0\nrequire_once '".__DIR__."/../../vendor/autoload.php';", $script);
$autoload = file_exists(__DIR__.'/../../vendor/autoload.php')
? __DIR__.'/../../vendor/autoload.php'
: __DIR__.'/../../../../../../../../autoload.php'
;
$script = preg_replace('/(\->register\(\);)/', "$0\nrequire_once '$autoload';\n", $script);
return $script;
}