From 43792c4505d89a5258e60e6ae6e957891e171d82 Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Thu, 29 Dec 2022 21:55:12 +0100 Subject: [PATCH] Tests: Fix "September" behavior difference in `testBuildDateLocale()` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Whether "Sep" or "Sept" is the short month name for "%h" apparently depends on `DateTime` or ext-intl, not on whether Microsoft Windows is used. Or something like that. PHP is weird… --- e107_tests/tests/unit/e_dateTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_tests/tests/unit/e_dateTest.php b/e107_tests/tests/unit/e_dateTest.php index c8cee8e9b..9cd3eb30a 100644 --- a/e107_tests/tests/unit/e_dateTest.php +++ b/e107_tests/tests/unit/e_dateTest.php @@ -127,7 +127,7 @@ { $actual = $this->dateObj->buildDateLocale(); - $september = (stripos(PHP_OS, 'WIN') === 0) ? 'Sept' : 'Sep'; + $september = eShims::strftime('%h', mktime(1, 1, 1, 9, 2, 2013)); $this->assertStringContainsString('$.fn.datetimepicker.dates["en"]', $actual); $this->assertStringContainsString('days: ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],', $actual);