CHAPTER 20 ■ CONTINUOUS INTEGRATION
Most of the tools I tested earlier are available inline through these tabs. I can check code coverage,
examine test results, and browse documentation. And I can be secure that CruiseControl will regularly
update the project and run a build (every five minutes by default). I can see an overview by clicking on
the Metrics tab. You can see this screen in Figure 20–8.
Figure 20–8. The Metrics screen
Test Failures
So far everything seems to be going well, even if userthing won’t be finding its way into the Zend
codebase any time soon. But tests succeed when they fail, so I'd better break something to make sure
that CruiseControl reports on it.
Here is a part of a class named Validate in the namespace userthing\util:
public function validateUser( $mail, $pass ) {
// make it always fail!
return false;
$user = $this->store->getUser( $mail );
if ( is_null( $user ) ) {
return null;
}
if ( $user->getPass() == $pass ) {
return true;
}