mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-14 19:08:25 +00:00
fix: Change assertPattern()/assertNoPattern() to match changes in PHPUnit API
This commit is contained in:
parent
0a05486693
commit
e99ea6021c
1 changed files with 4 additions and 4 deletions
|
@ -552,7 +552,7 @@ abstract class CakeTestCase extends \PHPUnit\Framework\TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compatibility wrapper function for assertRegexp
|
* Compatibility wrapper function for assertMatchesRegularExpression
|
||||||
*
|
*
|
||||||
* @param mixed $pattern a regular expression
|
* @param mixed $pattern a regular expression
|
||||||
* @param string $string the text to be matched
|
* @param string $string the text to be matched
|
||||||
|
@ -561,7 +561,7 @@ abstract class CakeTestCase extends \PHPUnit\Framework\TestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected static function assertPattern($pattern, $string, $message = '') {
|
protected static function assertPattern($pattern, $string, $message = '') {
|
||||||
return static::assertRegExp($pattern, $string, $message);
|
return static::assertMatchesRegularExpression($pattern, $string, $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -591,7 +591,7 @@ abstract class CakeTestCase extends \PHPUnit\Framework\TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compatibility wrapper function for assertNotRegExp
|
* Compatibility wrapper function for assertDoesNotMatchRegularExpression
|
||||||
*
|
*
|
||||||
* @param mixed $pattern a regular expression
|
* @param mixed $pattern a regular expression
|
||||||
* @param string $string the text to be matched
|
* @param string $string the text to be matched
|
||||||
|
@ -600,7 +600,7 @@ abstract class CakeTestCase extends \PHPUnit\Framework\TestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected static function assertNoPattern($pattern, $string, $message = '') {
|
protected static function assertNoPattern($pattern, $string, $message = '') {
|
||||||
return static::assertNotRegExp($pattern, $string, $message);
|
return static::assertDoesNotMatchRegularExpression($pattern, $string, $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue