title: Symfony2 tests: Issue with fixtures and foreign keys
body: <p>I'm developing a project with Symfony and Doctrine and I have an issue with my tests.
  I'm using Fixtures to load data for the tests, and some of my entities have associations between them.
  The first time I run my tests with empty DB tables the tests succeed flawlessly. But when I run the test once again, I got an error:</p>
  
  <blockquote>
    <p>Doctrine\DBAL\DBALException: An exception occurred while executing 'DELETE FROM Ent':</p>
    
    <p>SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (<code>my_db</code>.<code>Ent</code>, CONSTRAINT <code>FK_FE5D1D1E727ACA70</code> FOREIGN KEY (<code>parent_id</code>) REFERENCES <code>Ent</code> (<code>id</code>))</p>
  </blockquote>
  
  <p>The reason for the error is obvious: a row cannot be deleted when another row is referencing it though a foreign key.</p>
  
  <p>If I manually truncate the table disabling foreign key constrains first and run the test again with an empty table, the tests are successful once again. But I have to repeat this every time I run the tests.</p>
  
  <p>So the question is: is there a way to make Symfony or PHPUnit handle this automatically?</p>
  
  <p>Thanks!</p>
  
  <p>EDIT:
  I forgot to mention I'm using the Liip\FunctionalTestBundle\Test\WebTestCase class.</p>