From 7bfa538530d5c877501da8567e9c4a6c401285f4 Mon Sep 17 00:00:00 2001 From: Fernando Herrero Date: Fri, 26 Jan 2024 01:58:25 +0100 Subject: [PATCH] Fix tests: PHP-7.4 on Windows --- tests/LocaleTests/Locale_en_EN_TestTrait.php | 2 +- tests/LocaleTests/Locale_es_ES_TestTrait.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/LocaleTests/Locale_en_EN_TestTrait.php b/tests/LocaleTests/Locale_en_EN_TestTrait.php index 49fc99b..4f0baca 100644 --- a/tests/LocaleTests/Locale_en_EN_TestTrait.php +++ b/tests/LocaleTests/Locale_en_EN_TestTrait.php @@ -29,7 +29,7 @@ public function testLocale_en_EN () { $this->assertMatchesRegularExpression('~1:02:03 PM|13:02:03~', $result, '%X: Preferred time representation based on locale, without the date'); $result = strftime('%c', '20220306 13:02:03', $locale); - $this->assertEquals('March 6, 2022 at 13:02', $result, '%c: Preferred date and time stamp based on locale'); + $this->assertMatchesRegularExpression('~March 6, 2022 at (1:02 PM|13:02)~', $result, '%c: Preferred date and time stamp based on locale'); $result = strftime('%x', '20220306 13:02:03', $locale); $this->assertEquals('3/6/22', $result, '%x: Preferred date representation based on locale, without the time'); diff --git a/tests/LocaleTests/Locale_es_ES_TestTrait.php b/tests/LocaleTests/Locale_es_ES_TestTrait.php index 37d43d4..681efc5 100644 --- a/tests/LocaleTests/Locale_es_ES_TestTrait.php +++ b/tests/LocaleTests/Locale_es_ES_TestTrait.php @@ -17,7 +17,7 @@ public function testLocale_es_ES () { $this->assertEquals('domingo', $result, '%A: A full textual representation of the day'); $result = strftime('%b', '20220306 13:02:03', $locale); - $this->assertEquals('mar', $result, '%b: Abbreviated month name, based on the locale'); + $this->assertMatchesRegularExpression('~mar\.?~', $result, '%b: Abbreviated month name, based on the locale'); $result = strftime('%B', '20220306 13:02:03', $locale); $this->assertEquals('marzo', $result, '%B: Full month name, based on the locale');