CHAPTER 20 ■ CONTINUOUS INTEGRATION
$this->store->notifyPasswordFailure( $mail );
return false;
}
See how I’ve sabotaged the method? As it now stands validateUser() will always return false.
Here's the test that should choke on that. It’s in test/ValidatorTest.php:
public function testValidate_CorrectPass() {
$this->assertTrue(
$this->validator->validateUser( "[email protected]", "12345" ),
"Expecting successful validation"
);
}
Having made my change, all I need do is commit, and wait. Sure enough, before long, my status page
highlights userthing in an alarming orangey red. Once I’ve clicked on the project name, I select the
Tests tab. You can see the error report in Figure 20–9
Figure 20–9. Failed tests
Failure Notification
It’s very well having errors reported on the CruiseControl web interface, so long as people visit
frequently. There is a danger that the system’s quiet efficiency might cause it to be forgotten. You can