lithium\test\Unit::skipIf()

public method

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 $message

    Message to pass if the condition is met.

Returns

mixed

Source

	public function skipIf($condition, $message = false) {
		if ($condition) {
			throw new Exception(is_string($message) ? $message : null);
		}
	}