lithium\test\Unit::skipIf()
Skips test(s) if the condition is met.
When used within a subclass' skip method, all tests are ignored if the condition is
met, otherwise processing continues as normal. For other methods, only the remainder of
the method is skipped, when the condition is met.
Parameters
-
boolean
$condition -
string|boolean
$messageMessage to pass if the condition is met.
Returns
mixedSource
public function skipIf($condition, $message = false) {
if ($condition) {
throw new Exception(is_string($message) ? $message : null);
}
}