Skip to content

Commit b680354

Browse files
committed
minor #4556 fix intl-extra tests (xabbuh)
This PR was merged into the 3.x branch. Discussion ---------- fix intl-extra tests Commits ------- 1800707 fix intl-extra tests
2 parents d76d2d7 + 1800707 commit b680354

File tree

4 files changed

+43
-1
lines changed

4 files changed

+43
-1
lines changed

extra/intl-extra/Tests/Fixtures/format_date.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
--TEST--
22
"format_date" filter
3+
--CONDITION--
4+
version_compare(Symfony\Component\Intl\Intl::getIcuVersion(), '72.1', '<')
35
--TEMPLATE--
46
{{ '2019-08-07 23:39:12'|format_datetime() }}
57
{{ '2019-08-07 23:39:12'|format_datetime(locale='fr') }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
--TEST--
2+
"format_date" filter
3+
--CONDITION--
4+
version_compare(Symfony\Component\Intl\Intl::getIcuVersion(), '72.1', '>=')
5+
--TEMPLATE--
6+
{{ '2019-08-07 23:39:12'|format_datetime() }}
7+
{{ '2019-08-07 23:39:12'|format_datetime(locale='fr') }}
8+
{{ '2019-08-07 23:39:12'|format_datetime('none', 'short', locale='fr') }}
9+
{{ '2019-08-07 23:39:12'|format_datetime('short', 'none', locale='fr') }}
10+
{{ '2019-08-07 23:39:12'|format_datetime('full', 'full', locale='fr') }}
11+
{{ '2019-08-07 23:39:12'|format_datetime(pattern="hh 'oclock' a, zzzz") }}
12+
13+
{{ '2019-08-07 23:39:12'|format_date }}
14+
{{ '2019-08-07 23:39:12'|format_date(locale='fr') }}
15+
{{ '2019-08-07 23:39:12'|format_time }}
16+
--DATA--
17+
return [];
18+
--EXPECT--
19+
Aug 7, 2019, 11:39:12 PM
20+
7 août 2019, 23:39:12
21+
23:39
22+
07/08/2019
23+
mercredi 7 août 2019 à 23:39:12 temps universel coordonné
24+
11 oclock PM, Coordinated Universal Time
25+
26+
Aug 7, 2019
27+
7 août 2019
28+
11:39:12 PM

extra/intl-extra/Tests/Fixtures/format_date_php8.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--TEST--
22
"format_date" filter
33
--CONDITION--
4-
PHP_VERSION_ID >= 80000
4+
PHP_VERSION_ID >= 80000 && version_compare(Symfony\Component\Intl\Intl::getIcuVersion(), '72.1', '<')
55
--TEMPLATE--
66
{{ 'today 23:39:12'|format_datetime('relative_short', 'none', locale='fr') }}
77
{{ 'today 23:39:12'|format_datetime('relative_full', 'full', locale='fr') }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--TEST--
2+
"format_date" filter
3+
--CONDITION--
4+
PHP_VERSION_ID >= 80000 && version_compare(Symfony\Component\Intl\Intl::getIcuVersion(), '72.1', '>=')
5+
--TEMPLATE--
6+
{{ 'today 23:39:12'|format_datetime('relative_short', 'none', locale='fr') }}
7+
{{ 'today 23:39:12'|format_datetime('relative_full', 'full', locale='fr') }}
8+
--DATA--
9+
return [];
10+
--EXPECT--
11+
aujourd’hui
12+
aujourd’hui, 23:39:12 temps universel coordonné

0 commit comments

Comments
 (0)