I am using phpunit/dbunit to test sql server database, but it shows the following error
1) Tests\Integration\BlocksDaoIntegrationTest::test_insert_block PHPUnit_Extensions_Database_Operation_Exception: COMPOSITE[TRUNCATE] operation failed on query: TRUNCATE TABLE DIGITAL_DOCUMENTS_IMAGES using args: Array ( ) [SQLSTATE[42000]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot truncate table 'DIGITAL_DOCUMENTS_IMAGES' because it is being referenced by a FOREIGN KEY constraint.]
Could someone please help me to solve it? Thank you
(sorry for the english I'm Brazilian)
I have solved the problem extending the class PHPUnit_Extensions_Database_Operation_Truncate and then returning it:
The operation class:
My test base class: