lexik/LexikTranslationBundle — Issue #1: Incompatibility with LiipFunctionalTestBundle
Author: guilhermeblanco
Created: 2012-02-03 06:13:33+00:00
State: open

As the title says, this extension does not play nice with LiipFunctionalBundle, which brings real life support for WebTestCase.
I tried by many ways to address the issue, without any luck.
Here is my stack trace:

```
root@nde:~/nde/site-steve/symfony/app# phpunit --group Controller
PHPUnit 3.6.10 by Sebastian Bergmann.

Configuration read from /root/nde/site-steve/symfony/app/phpunit.xml.dist

E

Time: 55 seconds, Memory: 49.50Mb

There was 1 error:

1) IC\Bundle\Core\GeographicalBundle\Tests\Controller\LanguageControllerTest::testLocale
PDOException: SQLSTATE[HY000]: General error: 1 no such table: lexik_trans_unit

/root/nde/site-steve/symfony/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php:618
/root/nde/site-steve/symfony/vendor/doctrine/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php:46
/root/nde/site-steve/symfony/vendor/doctrine/lib/Doctrine/ORM/Query.php:249
/root/nde/site-steve/symfony/vendor/doctrine/lib/Doctrine/ORM/AbstractQuery.php:607
/root/nde/site-steve/symfony/vendor/doctrine/lib/Doctrine/ORM/AbstractQuery.php:425
/root/nde/site-steve/symfony/vendor/bundles/Lexik/Bundle/TranslationBundle/Repository/TransUnitRepository.php:32
/root/nde/site-steve/symfony/vendor/bundles/Lexik/Bundle/TranslationBundle/Translation/Translator.php:93
/root/nde/site-steve/symfony/app/cache/test/appTestDebugProjectContainer.php:1000
/root/nde/site-steve/symfony/app/bootstrap.php.cache:190
/root/nde/site-steve/symfony/app/cache/test/appTestDebugProjectContainer.php:2080
/root/nde/site-steve/symfony/app/bootstrap.php.cache:190
/root/nde/site-steve/symfony/app/cache/test/appTestDebugProjectContainer.php:60
/root/nde/site-steve/symfony/app/bootstrap.php.cache:190
/root/nde/site-steve/symfony/app/cache/test/appTestDebugProjectContainer.php:1291
/root/nde/site-steve/symfony/app/bootstrap.php.cache:190
/root/nde/site-steve/symfony/app/cache/test/appTestDebugProjectContainer.php:1307
/root/nde/site-steve/symfony/app/bootstrap.php.cache:190
/root/nde/site-steve/symfony/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/ContainerAwareEventDispatcher.php:134
/root/nde/site-steve/symfony/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/ContainerAwareEventDispatcher.php:116
/root/nde/site-steve/symfony/vendor/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:98
/root/nde/site-steve/symfony/vendor/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:71
/root/nde/site-steve/symfony/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/HttpKernel.php:46
/root/nde/site-steve/symfony/app/bootstrap.php.cache:547
/root/nde/site-steve/symfony/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Client.php:82
/root/nde/site-steve/symfony/vendor/symfony/src/Symfony/Component/BrowserKit/Client.php:265
/root/nde/site-steve/symfony/src/bundle-core-geographical/IC/Bundle/Core/GeographicalBundle/Tests/Controller/LanguageControllerTest.php:28
```

My test case:

```php
loadFixtures(array());
}

public function testLocale()
{
$client = static::createClient();

$client->setServerParameter('Referer', '/foo');
$client->followRedirects(false);

$client->request('GET', '/language/en');

$this->assertEquals('/foo', $client->getResponse()->getHeader('Location'));
}
}
```