This is because we've got a lot of database interaction, and the re-engineering effort required to go back and mock that all out is immense.
So, what's the best way to make sure you catch problems quickly?
In your AllTests.php, make it a policy to put new test suites at the top, rather than the bottom.
Basically:
public static function suite() {
$suite = new PHPUnit_Framework_TestSuite();
$suite-<addTestSuite('NewTest');
$suite-<addTestSuite('CoreTest');
return $suite;
}
This is the opposite thinking than "write your most important test cases first", but it helps you find the newest broken features.
No comments:
Post a Comment