liip/LiipFunctionalTestBundle — Issue #37: Functional test using mysql
Author: nakashiman
Created: 2012-02-01 06:39:00+00:00
State: open

Hi,
I am using mysql instead of sqlite during functional test,
because I want to get the production performance data like requst time..etc.
When I run the functional test, it shows error like this:

Time: 5 seconds, Memory: 34.75Mb

There was 1 error:

1) BB\CasioBundle\Tests\Functional\UserFunctionalTest::testGetOneUserInfo
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`test`.`role`, CONSTRAINT `FK_57698A6A727ACA70` FOREIGN KEY (`parent_id`) REFERENCES `role` (`id`))

/Users/apple/work/ddbak/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php:713
/Users/apple/work/ddbak/vendor/doctrine-fixtures/lib/Doctrine/Common/DataFixtures/Purger/ORMPurger.php:120
/Users/apple/work/ddbak/vendor/doctrine-fixtures/lib/Doctrine/Common/DataFixtures/Executor/AbstractExecutor.php:109
/Users/apple/work/ddbak/vendor/bundles/Liip/FunctionalTestBundle/Test/WebTestCase.php:198
/Users/apple/work/ddbak/src/BB/CasioBundle/Tests/Functional/UserFunctionalTest.php:48

FAILURES!
Tests: 1, Assertions: 0, Errors: 1.

And when I use sqlite as testing db, it would run successfully, so what's the problem with mysql as testing db?
Thanks in advanced.