I'm using phpunit and I'd like to know if there is a correct form for restoring the database before running integration tests. At the moment I'm calling an sql server script with php exec() on the testcase setUp method, but don't know if this is the best choice
class TestCase extends PHPUnit_FrameWork_TestCase {
protected function setUp() {
exec("the restore command line");
}
}
Is there a more correct form to do that?
Thank you
This is what DbUnit is all about. Have you looked at it?