From e99ea6021c1a73dd3bf488ce8227b53b37b25c3e Mon Sep 17 00:00:00 2001 From: Koji Tanaka Date: Fri, 30 Dec 2022 17:14:09 +0900 Subject: [PATCH] fix: Change assertPattern()/assertNoPattern() to match changes in PHPUnit API --- lib/Cake/TestSuite/CakeTestCase.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Cake/TestSuite/CakeTestCase.php b/lib/Cake/TestSuite/CakeTestCase.php index ecebda41a..3d8acaca3 100644 --- a/lib/Cake/TestSuite/CakeTestCase.php +++ b/lib/Cake/TestSuite/CakeTestCase.php @@ -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 string $string the text to be matched @@ -561,7 +561,7 @@ abstract class CakeTestCase extends \PHPUnit\Framework\TestCase { * @return void */ 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 string $string the text to be matched @@ -600,7 +600,7 @@ abstract class CakeTestCase extends \PHPUnit\Framework\TestCase { * @return void */ protected static function assertNoPattern($pattern, $string, $message = '') { - return static::assertNotRegExp($pattern, $string, $message); + return static::assertDoesNotMatchRegularExpression($pattern, $string, $message); } /**