I'm working with Symfony + Doctrine + PHPUnit, with NetBeans IDE. Here' my current approach to unit testing.
- setUp() function loads the test fixtures from .yml files
- tearDown() function delete all data from models. this is done by looping through an array of all my models' names to something like Doctrine_Query::delete($modelName)->execute()
This seems to work, but i'm just curious if this is the correct way to do it. I am essentially clearing all tables after each test function by specifying the models/tables to 'delete all' from.
Q1: I am just wondering if this is the correct way... Q2: this works nicely in Netbeans IDE, but does not seem to work via "./symfony test:unit". am i missing something or the CLI just works with lime?