Symfony - Delete and reload all database records for each test
- by Andree
Hi there,
From the Jobeet tutorial provided in Symfony website, I found out that I can load fixtures data each time I run unit test by using this script:
Doctrine_Core::loadData(sfConfig::get('sf_test_dir').'/fixtures');
However, I want to delete and reload all records from database each time I run a unit test. Currently, I'm doing this manually (Run symfony doctrine:build --all before each test). Can someone provided me a correct way to do this?