symfony/symfony — Issue #2574: Wrong database UniqueEntity + PHPUnit
Author: epschitz
Created: 2011-11-07 12:26:02+00:00
State: open

I'm using phpunit to test my application. I am using Annotation to
validate Entity and so far everything was fine, but when I added
@DoctrineAssert/UniqueEntity("field") the trouble began.

When I run the tests, it uses the database_name set in config_test,
but to verify the uniqueness of the field that he uses to define the
database_name of config_dev.
I discovered this when the schema was not created on the database dev
but it had the database test, this caused an error because It didn`t
found the table to check unique. If I remove the validation
UniqueEntity works without any error or if I run the schema on the
database dev also works.

This is a symfony bug or mine?

Thanks