mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Fix GH-12635: Test bug69398.phpt fails with ICU 74.1
ICU 74.1 contains new locale data that breaks the test. Split the test based on the version number to resolve the issue. Closes GH-12653.
This commit is contained in:
parent
b4208c8f96
commit
6641cd159e
3
NEWS
3
NEWS
@ -2,6 +2,9 @@ PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? ????, PHP 8.1.27
|
||||
|
||||
- Intl:
|
||||
. Fixed bug GH-12635 (Test bug69398.phpt fails with ICU 74.1). (nielsdos)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug GH-12628 (The gh11374 test fails on Alpinelinux). (nielsdos)
|
||||
|
||||
|
19
ext/intl/tests/bug69398-icu74.1.phpt
Normal file
19
ext/intl/tests/bug69398-icu74.1.phpt
Normal file
@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
IntlDateFormatter::formatObject(): returns wrong value when time style is NONE.
|
||||
--EXTENSIONS--
|
||||
intl
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (version_compare(INTL_ICU_VERSION, '74.1') < 0) die('skip for ICU < 74.1');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$millitimestamp = 1428133423941.0; // 14:43:43 April 04 2015
|
||||
$date = IntlCalendar::createInstance('Asia/Ho_Chi_Minh');
|
||||
$date->setTime($millitimestamp);
|
||||
echo IntlDateFormatter::formatObject($date, array(IntlDateFormatter::SHORT, IntlDateFormatter::NONE), 'vi_VN'), "\n";
|
||||
echo IntlDateFormatter::formatObject ($date, array(IntlDateFormatter::SHORT, IntlDateFormatter::NONE), 'ko_KR'), "\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
4/4/15
|
||||
15. 4. 4.
|
@ -3,7 +3,10 @@ IntlDateFormatter::formatObject(): returns wrong value when time style is NONE.
|
||||
--EXTENSIONS--
|
||||
intl
|
||||
--SKIPIF--
|
||||
<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') < 0) die('skip for ICU >= 51.1.2'); ?>
|
||||
<?php
|
||||
if (version_compare(INTL_ICU_VERSION, '50.1.2') < 0) die('skip for ICU < 51.1.2');
|
||||
if (version_compare(INTL_ICU_VERSION, '74.1') >= 0) die('skip for ICU >= 74.1');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$millitimestamp = 1428133423941.0; // 14:43:43 April 04 2015
|
||||
|
Loading…
Reference in New Issue
Block a user