fix intl-extra tests

This commit is contained in:
Christian Flothmann
2025-01-24 21:10:08 +01:00
parent 939c0324c7
commit 18007078ba
4 changed files with 43 additions and 1 deletions
@@ -1,5 +1,7 @@
--TEST--
"format_date" filter
--CONDITION--
version_compare(Symfony\Component\Intl\Intl::getIcuVersion(), '72.1', '<')
--TEMPLATE--
{{ '2019-08-07 23:39:12'|format_datetime() }}
{{ '2019-08-07 23:39:12'|format_datetime(locale='fr') }}
@@ -0,0 +1,28 @@
--TEST--
"format_date" filter
--CONDITION--
version_compare(Symfony\Component\Intl\Intl::getIcuVersion(), '72.1', '>=')
--TEMPLATE--
{{ '2019-08-07 23:39:12'|format_datetime() }}
{{ '2019-08-07 23:39:12'|format_datetime(locale='fr') }}
{{ '2019-08-07 23:39:12'|format_datetime('none', 'short', locale='fr') }}
{{ '2019-08-07 23:39:12'|format_datetime('short', 'none', locale='fr') }}
{{ '2019-08-07 23:39:12'|format_datetime('full', 'full', locale='fr') }}
{{ '2019-08-07 23:39:12'|format_datetime(pattern="hh 'oclock' a, zzzz") }}
{{ '2019-08-07 23:39:12'|format_date }}
{{ '2019-08-07 23:39:12'|format_date(locale='fr') }}
{{ '2019-08-07 23:39:12'|format_time }}
--DATA--
return [];
--EXPECT--
Aug 7, 2019, 11:39:12PM
7 août 2019, 23:39:12
23:39
07/08/2019
mercredi 7 août 2019 à 23:39:12 temps universel coordonné
11 oclock PM, Coordinated Universal Time
Aug 7, 2019
7 août 2019
11:39:12PM
@@ -1,7 +1,7 @@
--TEST--
"format_date" filter
--CONDITION--
PHP_VERSION_ID >= 80000
PHP_VERSION_ID >= 80000 && version_compare(Symfony\Component\Intl\Intl::getIcuVersion(), '72.1', '<')
--TEMPLATE--
{{ 'today 23:39:12'|format_datetime('relative_short', 'none', locale='fr') }}
{{ 'today 23:39:12'|format_datetime('relative_full', 'full', locale='fr') }}
@@ -0,0 +1,12 @@
--TEST--
"format_date" filter
--CONDITION--
PHP_VERSION_ID >= 80000 && version_compare(Symfony\Component\Intl\Intl::getIcuVersion(), '72.1', '>=')
--TEMPLATE--
{{ 'today 23:39:12'|format_datetime('relative_short', 'none', locale='fr') }}
{{ 'today 23:39:12'|format_datetime('relative_full', 'full', locale='fr') }}
--DATA--
return [];
--EXPECT--
aujourdhui
aujourdhui, 23:39:12 temps universel coordonné