From 0a5b0e4de1f1bb6da016622afa8ca29c5dd92351 Mon Sep 17 00:00:00 2001 From: Peter Gribanov Date: Tue, 19 Nov 2024 10:26:40 +0300 Subject: [PATCH] fix: Error: Call to undefined method GpsLab\Bundle\GeoIP2Bundle\Tests\Downloader\MaxMindDownloaderTest::assertMatchesRegularExpression() --- tests/Downloader/MaxMindDownloaderTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/Downloader/MaxMindDownloaderTest.php b/tests/Downloader/MaxMindDownloaderTest.php index 844d3d5..c33f516 100644 --- a/tests/Downloader/MaxMindDownloaderTest.php +++ b/tests/Downloader/MaxMindDownloaderTest.php @@ -180,4 +180,16 @@ public function testDownload(): void $this->downloader->download($url, $target); } + + /** + * Hook for BC + */ + public static function assertMatchesRegularExpression(string $pattern, string $string, string $message = ''): void + { + if (method_exists(parent::class, 'assertMatchesRegularExpression')) { + parent::assertMatchesRegularExpression($pattern, $string, $message); + } else { + parent::assertRegExp($pattern, $string, $message); + } + } }