diff --git a/ext/intl/tests/dateformat_calendars_variant3.phpt b/ext/intl/tests/dateformat_calendars_variant3.phpt index d189361bcffb6..1ad970d07d0e6 100644 --- a/ext/intl/tests/dateformat_calendars_variant3.phpt +++ b/ext/intl/tests/dateformat_calendars_variant3.phpt @@ -6,6 +6,7 @@ date.timezone=Atlantic/Azores intl --SKIPIF-- = 54.1'); ?> += 0) die('skip for ICU < 72.1'); ?> --FILE-- = 72.1'); ?> +--FILE-- +format(strtotime('2012-01-01 00:00:00 +0000'))); +var_dump($fmt2->format(strtotime('2012-01-01 00:00:00 +0000'))); +var_dump($fmt3->format(strtotime('2012-01-01 00:00:00 +0000'))); + +new IntlDateFormatter('en_US@calendar=hebrew', + IntlDateFormatter::FULL, + IntlDateFormatter::FULL, + 'GMT+05:12', + -1); +?> +==DONE== +--EXPECTF-- +string(49) "Sunday, January 1, 2012 at 5:12:00 AM GMT+05:12" +string(49) "Sunday, January 1, 2012 at 5:12:00 AM GMT+05:12" +string(46) "Sunday, 6 Tevet 5772 at 5:12:00 AM GMT+05:12" + +Fatal error: Uncaught IntlException: IntlDateFormatter::__construct(): datefmt_create: Invalid value for calendar type; it must be one of IntlDateFormatter::TRADITIONAL (locale's default calendar) or IntlDateFormatter::GREGORIAN. Alternatively, it can be an IntlCalendar object in %s:%d +Stack trace: +#0 %s(%d): IntlDateFormatter->__construct('en_US@calendar=...', 0, 0, 'GMT+05:12', -1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/dateformat_create_default.phpt b/ext/intl/tests/dateformat_create_default.phpt index eddac36f5ea39..1479ee9a98476 100644 --- a/ext/intl/tests/dateformat_create_default.phpt +++ b/ext/intl/tests/dateformat_create_default.phpt @@ -4,6 +4,8 @@ IntlDateFormatter::create() with default date and time types intl --INI-- date.timezone=UTC +--SKIPIF-- += 0) die('skip for ICU < 72.1'); ?> --FILE-- = 72.1'); ?> +--FILE-- +format($ts), "\n"; + +$fmt = new IntlDateFormatter('en_US'); +echo $fmt->format($ts), "\n"; + +$fmt = datefmt_create('en_US'); +echo $fmt->format($ts), "\n"; + +?> +--EXPECT-- +Sunday, January 1, 2012 at 12:00:00 AM Coordinated Universal Time +Sunday, January 1, 2012 at 12:00:00 AM Coordinated Universal Time +Sunday, January 1, 2012 at 12:00:00 AM Coordinated Universal Time diff --git a/ext/intl/tests/dateformat_formatObject_calendar_variant5.phpt b/ext/intl/tests/dateformat_formatObject_calendar_variant5.phpt index 494b66768906f..9eb9f39a917a7 100644 --- a/ext/intl/tests/dateformat_formatObject_calendar_variant5.phpt +++ b/ext/intl/tests/dateformat_formatObject_calendar_variant5.phpt @@ -4,6 +4,7 @@ IntlDateFormatter::formatObject(): IntlCalendar tests intl --SKIPIF-- = 55.1'); ?> += 0) die('skip for ICU < 72.1'); ?> --FILE-- = 72.1'); ?> +--FILE-- +setTime(strtotime('2012-01-01 00:00:00')*1000.); +echo IntlDateFormatter::formatObject($cal), "\n"; +echo IntlDateFormatter::formatObject($cal, IntlDateFormatter::FULL, "en-US"), "\n"; + +?> +--EXPECTF-- +01/01/2012, 00:00:00 +domingo, 1 de janeiro de 2012 às 00:00:00 Hora padrão %Sda Europa Ocidental +Jan 1, 2012, 12:00:00 AM +1/1/12, 12:00:00 AM Western European Standard Time +Sun 2012-01-1 00,00,00.000 Portugal Time +domingo, 1 de janeiro de 2012 às 05:00:00 GMT+03:00 +06/02/1433, 00:00:00 +Sunday, Safar 6, 1433 at 12:00:00 AM Western European Standard Time diff --git a/ext/intl/tests/dateformat_formatObject_datetime_variant5.phpt b/ext/intl/tests/dateformat_formatObject_datetime_variant5.phpt index b51a46d7f3976..b3c2ecc8e7932 100644 --- a/ext/intl/tests/dateformat_formatObject_datetime_variant5.phpt +++ b/ext/intl/tests/dateformat_formatObject_datetime_variant5.phpt @@ -4,6 +4,7 @@ IntlDateFormatter::formatObject(): DateTime tests intl --SKIPIF-- = 55.1'); ?> += 0) die('skip for ICU < 72.1'); ?> --FILE-- +--FILE-- + +--EXPECTF-- +01/01/2012, 00:00:00 +domingo, 1 de janeiro de 2012 às 00:00:00 Hora padrão %Sda Europa Ocidental +Jan 1, 2012, 12:00:00 AM +1/1/12, 12:00:00 AM Western European Standard Time +Sun 2012-01-1 00,00,00.000 Portugal Time +domingo, 1 de janeiro de 2012 às 05:00:00 GMT+03:00 diff --git a/ext/intl/tests/dateformat_format_parse_version2.phpt b/ext/intl/tests/dateformat_format_parse_version2.phpt index 19e7d914adcfd..1293d29c383bf 100644 --- a/ext/intl/tests/dateformat_format_parse_version2.phpt +++ b/ext/intl/tests/dateformat_format_parse_version2.phpt @@ -4,6 +4,7 @@ datefmt_format_code() and datefmt_parse_code() intl --SKIPIF-- = 51.2'); ?> += 0) die('skip for ICU < 72.1'); ?> --FILE-- = 72.1'); ?> +--FILE-- + 24 , + 'tm_min' => 3, + 'tm_hour' => 19, + 'tm_mday' => 3, + 'tm_mon' => 3, + 'tm_year' => 105, + ); + $localtime_arr2 = array ( + 'tm_sec' => 21, + 'tm_min' => 5, + 'tm_hour' => 7, + 'tm_mday' => 13, + 'tm_mon' => 7, + 'tm_year' => 205, + ); + $localtime_arr3 = array ( + 'tm_sec' => 11, + 'tm_min' => 13, + 'tm_hour' => 0, + 'tm_mday' => 17, + 'tm_mon' => 11, + 'tm_year' => -5 + ); + + $localtime_arr = array ( + $localtime_arr1, + $localtime_arr2, + $localtime_arr3 + ); + + //Test format and parse with a timestamp : long + foreach( $time_arr as $timestamp_entry){ + $res_str .= "\n------------\n"; + $res_str .= "\nInput timestamp is : $timestamp_entry"; + $res_str .= "\n------------\n"; + foreach( $locale_arr as $locale_entry ){ + foreach( $datetype_arr as $datetype_entry ) { + $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; + $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,$timezone); + $formatted = ut_datefmt_format( $fmt , $timestamp_entry); + $res_str .= "\nFormatted timestamp is : $formatted"; + $parsed = ut_datefmt_parse( $fmt , $formatted); + if( intl_get_error_code() == U_ZERO_ERROR){ + $res_str .= "\nParsed timestamp is : $parsed"; + }else{ + $res_str .= "\nError while parsing as: '".intl_get_error_message()."'"; + } + } + } + } + + //Test format and parse with a localtime :array + foreach( $localtime_arr as $localtime_entry){ + $res_str .= "\n------------\n"; + $res_str .= "\nInput localtime is : "; + foreach( $localtime_entry as $key => $value){ + $res_str .= "$key : '$value' , "; + } + + $res_str .= "\n------------\n"; + foreach( $locale_arr as $locale_entry ){ + foreach( $datetype_arr as $datetype_entry ) { + $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; + $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,$timezone); + $formatted1 = ut_datefmt_format( $fmt , $localtime_entry); + if( intl_get_error_code() == U_ZERO_ERROR){ + $res_str .= "\nFormatted localtime_array is : $formatted1"; + }else{ + $res_str .= "\nError while formatting as: '".intl_get_error_message()."'"; + } + //Parsing + $parsed_arr = ut_datefmt_localtime( $fmt, $formatted1 ); + + if( $parsed_arr){ + $res_str .= "\nParsed array is: "; + foreach( $parsed_arr as $key => $value){ + $res_str .= "$key : '$value' , "; + } + } +/* + else{ + //$res_str .= "No values found from LocaleTime parsing."; + $res_str .= "\tError : '".intl_get_error_message()."'"; + } +*/ + } + } + } + + return $res_str; + +} + +include_once( 'ut_common.inc' ); + +// Run the test +ut_run(); +?> +--EXPECT-- +------------ + +Input timestamp is : 0 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Thursday, January 1, 1970 at 5:00:00 AM GMT+05:00 +Parsed timestamp is : 0 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : January 1, 1970 at 5:00:00 AM GMT+5 +Parsed timestamp is : 0 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Jan 1, 1970, 5:00:00 AM +Parsed timestamp is : 0 +------------ + +Input timestamp is : -1200000 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Thursday, December 18, 1969 at 7:40:00 AM GMT+05:00 +Parsed timestamp is : -1200000 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : December 18, 1969 at 7:40:00 AM GMT+5 +Parsed timestamp is : -1200000 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Dec 18, 1969, 7:40:00 AM +Parsed timestamp is : -1200000 +------------ + +Input timestamp is : 1200000 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Thursday, January 15, 1970 at 2:20:00 AM GMT+05:00 +Parsed timestamp is : 1200000 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : January 15, 1970 at 2:20:00 AM GMT+5 +Parsed timestamp is : 1200000 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Jan 15, 1970, 2:20:00 AM +Parsed timestamp is : 1200000 +------------ + +Input timestamp is : 2200000000 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Monday, September 19, 2039 at 4:06:40 AM GMT+05:00 +Parsed timestamp is : 2200000000 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : September 19, 2039 at 4:06:40 AM GMT+5 +Parsed timestamp is : 2200000000 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Sep 19, 2039, 4:06:40 AM +Parsed timestamp is : 2200000000 +------------ + +Input timestamp is : -2200000000 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Sunday, April 15, 1900 at 5:53:20 AM GMT+05:00 +Parsed timestamp is : -2200000000 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : April 15, 1900 at 5:53:20 AM GMT+5 +Parsed timestamp is : -2200000000 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Apr 15, 1900, 5:53:20 AM +Parsed timestamp is : -2200000000 +------------ + +Input timestamp is : 90099999 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Thursday, November 9, 1972 at 12:46:39 AM GMT+05:00 +Parsed timestamp is : 90099999 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : November 9, 1972 at 12:46:39 AM GMT+5 +Parsed timestamp is : 90099999 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Nov 9, 1972, 12:46:39 AM +Parsed timestamp is : 90099999 +------------ + +Input timestamp is : 3600 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Thursday, January 1, 1970 at 6:00:00 AM GMT+05:00 +Parsed timestamp is : 3600 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : January 1, 1970 at 6:00:00 AM GMT+5 +Parsed timestamp is : 3600 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Jan 1, 1970, 6:00:00 AM +Parsed timestamp is : 3600 +------------ + +Input timestamp is : -3600 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Thursday, January 1, 1970 at 4:00:00 AM GMT+05:00 +Parsed timestamp is : -3600 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : January 1, 1970 at 4:00:00 AM GMT+5 +Parsed timestamp is : -3600 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Jan 1, 1970, 4:00:00 AM +Parsed timestamp is : -3600 +------------ + +Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' , +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted localtime_array is : Sunday, April 3, 2005 at 7:03:24 PM GMT+05:00 +Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_year : '105' , tm_mday : '3' , tm_wday : '0' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '0' , +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted localtime_array is : April 3, 2005 at 7:03:24 PM GMT+5 +Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_year : '105' , tm_mday : '3' , tm_wday : '0' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '0' , +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted localtime_array is : Apr 3, 2005, 7:03:24 PM +Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_year : '105' , tm_mday : '3' , tm_wday : '0' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '0' , +------------ + +Input localtime is : tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_mday : '13' , tm_mon : '7' , tm_year : '205' , +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted localtime_array is : Thursday, August 13, 2105 at 7:05:21 AM GMT+05:00 +Parsed array is: tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_year : '205' , tm_mday : '13' , tm_wday : '4' , tm_yday : '225' , tm_mon : '7' , tm_isdst : '0' , +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted localtime_array is : August 13, 2105 at 7:05:21 AM GMT+5 +Parsed array is: tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_year : '205' , tm_mday : '13' , tm_wday : '4' , tm_yday : '225' , tm_mon : '7' , tm_isdst : '0' , +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted localtime_array is : Aug 13, 2105, 7:05:21 AM +Parsed array is: tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_year : '205' , tm_mday : '13' , tm_wday : '4' , tm_yday : '225' , tm_mon : '7' , tm_isdst : '0' , +------------ + +Input localtime is : tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_mday : '17' , tm_mon : '11' , tm_year : '-5' , +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted localtime_array is : Tuesday, December 17, 1895 at 12:13:11 AM GMT+05:00 +Parsed array is: tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_year : '-5' , tm_mday : '17' , tm_wday : '2' , tm_yday : '351' , tm_mon : '11' , tm_isdst : '0' , +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted localtime_array is : December 17, 1895 at 12:13:11 AM GMT+5 +Parsed array is: tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_year : '-5' , tm_mday : '17' , tm_wday : '2' , tm_yday : '351' , tm_mon : '11' , tm_isdst : '0' , +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted localtime_array is : Dec 17, 1895, 12:13:11 AM +Parsed array is: tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_year : '-5' , tm_mday : '17' , tm_wday : '2' , tm_yday : '351' , tm_mon : '11' , tm_isdst : '0' , diff --git a/ext/intl/tests/dateformat_set_timezone_id3.phpt b/ext/intl/tests/dateformat_set_timezone_id3.phpt index e0d7cd0e52607..a4952eb5a3dcb 100644 --- a/ext/intl/tests/dateformat_set_timezone_id3.phpt +++ b/ext/intl/tests/dateformat_set_timezone_id3.phpt @@ -6,6 +6,7 @@ date.timezone=Atlantic/Azores intl --SKIPIF-- = 51.2'); ?> += 0) die('skip for ICU < 72.1'); ?> --FILE-- = 4.8 +--INI-- +date.timezone=Atlantic/Azores +--EXTENSIONS-- +intl +--SKIPIF-- += 72.1'); ?> +--FILE-- + +--EXPECTF-- +Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: No such time zone: 'CN' in %sut_common.inc on line %d + +Warning: datefmt_set_timezone(): datefmt_set_timezone: No such time zone: 'CN' in %sut_common.inc on line %d + +After creation of the dateformatter : timezone_id= US/Pacific +----------- +Trying to set timezone_id= America/New_York +After call to set_timezone_id : timezone_id= America/New_York +Formatting timestamp=0 resulted in Wednesday, December 31, 1969 at 7:00:00 PM Eastern Standard Time +Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 at 8:00:00 PM Eastern Standard Time +----------- +Trying to set timezone_id= America/Los_Angeles +After call to set_timezone_id : timezone_id= America/Los_Angeles +Formatting timestamp=0 resulted in Wednesday, December 31, 1969 at 4:00:00 PM Pacific Standard Time +Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 at 5:00:00 PM Pacific Standard Time +----------- +Trying to set timezone_id= America/Chicago +After call to set_timezone_id : timezone_id= America/Chicago +Formatting timestamp=0 resulted in Wednesday, December 31, 1969 at 6:00:00 PM Central Standard Time +Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 at 7:00:00 PM Central Standard Time +----------- +Trying to set timezone_id= CN +After call to set_timezone_id : timezone_id= America/Chicago +Formatting timestamp=0 resulted in Wednesday, December 31, 1969 at 6:00:00 PM Central Standard Time +Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 at 7:00:00 PM Central Standard Time diff --git a/ext/intl/tests/datepatterngenerator_get_best_pattern.phpt b/ext/intl/tests/datepatterngenerator_get_best_pattern.phpt index 9e29bc90493e9..279554123b795 100644 --- a/ext/intl/tests/datepatterngenerator_get_best_pattern.phpt +++ b/ext/intl/tests/datepatterngenerator_get_best_pattern.phpt @@ -2,6 +2,8 @@ IntlDatePatternGenerator::getBestPattern() --EXTENSIONS-- intl +--SKIPIF-- += 0) die('skip for ICU < 72.1'); ?> --FILE-- = 72.1'); ?> +--FILE-- +getBestPattern("jjmm"), "\n"; +echo $dtpg2->getBestPattern("jjmm"), "\n"; +echo $dtpg3->getBestPattern("YYYYMMMdd"), "\n"; +echo $dtpg4->getBestPattern("YYYYMMMdd"), "\n"; + +echo $dtpg->getBestPattern(""), "\n"; + +try { + $dtpg->getBestPattern(); +} catch(\ArgumentCountError $e) { + echo $e->getMessage(), "\n"; +} + +?> +--EXPECT-- +h:mm a +HH:mm +MMM dd, YYYY +dd. MMM YYYY + +IntlDatePatternGenerator::getBestPattern() expects exactly 1 argument, 0 given diff --git a/ext/intl/tests/msgfmt_format_datetime.phpt b/ext/intl/tests/msgfmt_format_datetime.phpt index 8b3e37ab30f5d..e6a7451906f77 100644 --- a/ext/intl/tests/msgfmt_format_datetime.phpt +++ b/ext/intl/tests/msgfmt_format_datetime.phpt @@ -4,6 +4,8 @@ MessageFormatter::format(): DateTime accepted to format dates and times date.timezone=Atlantic/Azores --EXTENSIONS-- intl +--SKIPIF-- += 0) die('skip for ICU < 72.1'); ?> --FILE-- = 72.1'); ?> +--FILE-- +format(array($dt))); +var_dump($mf->format(array($dti))); + +?> +--EXPECT-- +string(24) "May 6, 2012 5:00:42 PM" +string(24) "May 6, 2012 5:00:42 PM" diff --git a/ext/intl/tests/msgfmt_format_simple_types_numeric_strings.phpt b/ext/intl/tests/msgfmt_format_simple_types_numeric_strings.phpt index 9bc38b683cd0a..f92eaa2bdb54a 100644 --- a/ext/intl/tests/msgfmt_format_simple_types_numeric_strings.phpt +++ b/ext/intl/tests/msgfmt_format_simple_types_numeric_strings.phpt @@ -4,6 +4,8 @@ MessageFormatter::format(): simple types handling with numeric strings date.timezone=Atlantic/Azores --EXTENSIONS-- intl +--SKIPIF-- += 0) die('skip for ICU < 72.1'); ?> --FILE-- = 72.1'); ?> +--FILE-- +format(array( +'a' => $ex, +'b' => $ex, +'c' => $ex, +'d' => $ex, +'e' => $ex, +'f' => " 1336317965.5", +'g' => " 1336317965.5", +'h' => $ex, +'i' => $ex, +'j' => $ex, +))); + +?> +--EXPECTF-- +string(%d) " + none 1336317965.5 str + number 1,336,317,965.5 + number integer 1,336,317,965 + number currency $1,336,317,965.50 + number percent 133,631,796,550% + date May %d, 2012 + time 3:26:05 PM + spellout one billion three hundred thirty-six million three hundred seventeen thousand nine hundred sixty-five point five + ordinal 1,336,317,966th + duration 371,199:26:06 +" diff --git a/ext/intl/tests/resourcebundle_null_mandatory_args_variant2.phpt b/ext/intl/tests/resourcebundle_null_mandatory_args_variant2.phpt index 31250027184b3..5aefcf268dff5 100644 --- a/ext/intl/tests/resourcebundle_null_mandatory_args_variant2.phpt +++ b/ext/intl/tests/resourcebundle_null_mandatory_args_variant2.phpt @@ -6,6 +6,7 @@ date.timezone=Atlantic/Azores intl --SKIPIF-- = 51.2'); ?> += 0) die('skip for ICU < 72.1'); ?> --FILE-- = 72.1'); ?> +--FILE-- +get('calendar')->get('gregorian')->get('DateTimePatterns')->get(0); +var_dump($c); + +ini_set('intl.default_locale', 'pt_PT'); +$r = new ResourceBundle(NULL, NULL); +$c = $r->get('calendar')->get('gregorian')->get('DateTimePatterns')->get(0); +var_dump($c); +?> +--EXPECT-- +string(16) "h:mm:ss a zzzz" +string(13) "HH:mm:ss zzzz"