From 78c55044611437988b54e1daecf13f247a742bf8 Mon Sep 17 00:00:00 2001 From: Gintautas Miselis Date: Tue, 27 Sep 2022 09:17:39 +0300 Subject: [PATCH] 2.0 Fix compatibility with PHPUnit 8 --- src/Codeception/Util/Shared/Asserts.php | 6 +++--- src/Codeception/Util/Shared/InheritedAsserts.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Codeception/Util/Shared/Asserts.php b/src/Codeception/Util/Shared/Asserts.php index eef1846..5e0ff27 100644 --- a/src/Codeception/Util/Shared/Asserts.php +++ b/src/Codeception/Util/Shared/Asserts.php @@ -40,7 +40,7 @@ protected function assertNot($arguments) */ protected function assertFileNotExists(string $filename, string $message = '') { - TestCase::assertFileDoesNotExist($filename, $message); + TestCase::assertFileNotExists($filename, $message); } /** @@ -80,7 +80,7 @@ protected function assertLessOrEquals($expected, $actual, string $message = '') */ protected function assertNotRegExp(string $pattern, string $string, string $message = '') { - TestCase::assertDoesNotMatchRegularExpression($pattern, $string, $message); + TestCase::assertNotRegExp($pattern, $string, $message); } /** @@ -88,7 +88,7 @@ protected function assertNotRegExp(string $pattern, string $string, string $mess */ protected function assertRegExp(string $pattern, string $string, string $message = '') { - TestCase::assertMatchesRegularExpression($pattern, $string, $message); + TestCase::assertRegExp($pattern, $string, $message); } /** diff --git a/src/Codeception/Util/Shared/InheritedAsserts.php b/src/Codeception/Util/Shared/InheritedAsserts.php index 4102cf5..39c767e 100644 --- a/src/Codeception/Util/Shared/InheritedAsserts.php +++ b/src/Codeception/Util/Shared/InheritedAsserts.php @@ -164,7 +164,7 @@ protected function assertDirectoryIsWritable(string $directory, string $message */ protected function assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = '') { - TestCase::assertDoesNotMatchRegularExpression($pattern, $string, $message); + TestCase::assertNotRegExp($pattern, $string, $message); } /** @@ -236,7 +236,7 @@ protected function assertFalse($condition, string $message = '') */ protected function assertFileDoesNotExist(string $filename, string $message = '') { - TestCase::assertFileDoesNotExist($filename, $message); + TestCase::assertFileNotExists($filename, $message); } /** @@ -734,7 +734,7 @@ protected function assertLessThanOrEqual($expected, $actual, string $message = ' */ protected function assertMatchesRegularExpression(string $pattern, string $string, string $message = '') { - TestCase::assertMatchesRegularExpression($pattern, $string, $message); + TestCase::assertRegExp($pattern, $string, $message); } /**