mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Adding skipUnless compatibility method.
This commit is contained in:
parent
17054db31f
commit
d27381f3a2
1 changed files with 14 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue