From 98b89551858bf11820e9b5880cb3ff7885a1d5e4 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 25 Nov 2021 09:13:14 -0800 Subject: [PATCH] Rolled back e_dateAlternateTest() Windows fix. --- .../e107/Shims/Internal/e_dateAlternateTest.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/e107_tests/tests/unit/e107/Shims/Internal/e_dateAlternateTest.php b/e107_tests/tests/unit/e107/Shims/Internal/e_dateAlternateTest.php index 8c43ab087..06618bfdd 100644 --- a/e107_tests/tests/unit/e107/Shims/Internal/e_dateAlternateTest.php +++ b/e107_tests/tests/unit/e107/Shims/Internal/e_dateAlternateTest.php @@ -37,13 +37,13 @@ function defined($constant_name) * @param array|string|int $locales * @param string ...$rest * @return false|string - *//* + */ function setlocale($category, $locales, ...$rest) { if (e_dateAlternateTest::$alternate_locale) return 'nl_NL'; return \setlocale($category, $locales, ...$rest); -}*/ +} class e_dateAlternateTest extends \e_dateTest @@ -76,23 +76,18 @@ class e_dateAlternateTest extends \e_dateTest try { - setlocale(LC_ALL,'nl_NL.utf8', 'nl'); + $actual = $this->dateObj->convert_date(mktime(12, 45, 03, 2, 5, 2018), 'long'); $expected = 'maandag 05 februari 2018 - 12:45:03'; $this->assertEquals($expected, $actual); - setlocale(LC_ALL,'es_SP.utf8', 'es'); - - $actual = $this->dateObj->convert_date(mktime(12, 45, 03, 2, 5, 2018), 'inputdate'); - $expected = 'lunes, 05 feb, 2018'; + $actual = $this->dateObj->convert_date(mktime(12, 45, 03, 2, 5, 2018), 'inputtime'); + $expected = '12:45 P.M.'; $this->assertEquals($expected, $actual); } finally { self::$alternate_locale = false; - setlocale(LC_ALL, 'en_GB.UTF-8', 'en_GB.utf8', 'en'); } - - } }