Adding skipUnless compatibility method.

This commit is contained in:
mark_story 2010-06-09 17:07:17 -04:00
parent 17054db31f
commit d27381f3a2

View file

@ -509,4 +509,18 @@ class CakeTestCase extends PHPUnit_Framework_TestCase {
$lower = $value - $margin;
$this->assertTrue((($expected <= $upper) && ($expected >= $lower)), $message);
}
/**
* Compatibility function for skipping.
*
* @param boolean $condition Condition to trigger skipping
* @param string $message Message for skip
* @return boolean
*/
protected function skipUnless($condition, $message = '') {
if (!$condition) {
$this->markTestSkipped($message);
}
return $condition;
}
}