Description

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 $message Message to pass if the condition is met.

Returns

mixed
				public function skipIf($condition, $message = 'Skipped test {:class}::{:function}()') {
		if (!$condition) {
			return;
		}
		$trace = Debugger::trace(array('start' => 2, 'depth' => 3, 'format' => 'array'));
		throw new Exception(String::insert($message, $trace));
	}