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.
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=e6f96cb7-3f84-44f8-a428-576ee0e28969)
No comments:
Post a Comment