How to force a failure with phpunit
I believe this should work within a test case:
$this->fail('Message');
Another way to do it (especially helpful when writing a testing tool) would be:
use PHPUnit_Framework_ExpectationFailedException as PHPUnitException;
try {
// something here
} catch (SpecificException $e) {
// force a fail:
throw new PHPUnitException("This was not expected.");
}
Yes, theres a way,
$this->fail("your message");
if you want to see the page u have failed than
print_r(getResponse()->getContent());