Throw PHPUnit_Framework_AssertionFailedError on test failure
Fix logical branch