mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-30 20:16:45 +00:00
fix intl-extra tests
This commit is contained in:
@@ -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:12 PM
|
||||
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:12 PM
|
||||
@@ -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--
|
||||
aujourd’hui
|
||||
aujourd’hui, 23:39:12 temps universel coordonné
|
||||
Reference in New Issue
Block a user