[TwigBridge] fixed bootstrap

This commit is contained in:
Eriksen Costa 2012-04-07 18:47:00 -03:00
parent dee79e910d
commit 140ac2014e
2 changed files with 7 additions and 5 deletions

View File

@ -16,7 +16,8 @@ Components, declare the following environment variables before running
PHPUnit:
export TWIG=../path/to/Twig
export SYMFONY_FORM=../path/to/Form
export SYMFONY_TRANSLATION=../path/to/Translation
export SYMFONY_EVENT_DISPATCHER=../path/to/EventDispatcher
export SYMFONY_FORM=../path/to/Form
export SYMFONY_LOCALE=../path/to/Locale
export SYMFONY_TEMPLATING=../path/to/Templating
export SYMFONY_TRANSLATION=../path/to/Translation

View File

@ -11,10 +11,11 @@
spl_autoload_register(function ($class) {
foreach (array(
'SYMFONY_FORM' => 'Form',
'SYMFONY_TRANSLATION' => 'Translation',
'SYMFONY_LOCALE' => 'Locale',
'SYMFONY_EVENT_DISPATCHER' => 'EventDispatcher',
'SYMFONY_FORM' => 'Form',
'SYMFONY_LOCALE' => 'Locale',
'SYMFONY_TEMPLATING' => 'Templating',
'SYMFONY_TRANSLATION' => 'Translation',
) as $env => $name) {
if (isset($_SERVER[$env]) && 0 === strpos(ltrim($class, '/'), 'Symfony\Component\\'.$name)) {
if (file_exists($file = $_SERVER[$env].'/'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\\'.$name)).'.php')) {