From: Anatol Belski Date: Fri, 20 Oct 2017 17:02:42 +0000 (+0200) Subject: Add test for newer ICU version X-Git-Tag: php-7.0.26RC1~70 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2198d38cbc12beeaf00be688cf33a5a6697ea20c;p=php Add test for newer ICU version --- diff --git a/ext/intl/tests/formatter_get_locale_variant3.phpt b/ext/intl/tests/formatter_get_locale_variant3.phpt new file mode 100644 index 0000000000..901e2353b4 --- /dev/null +++ b/ext/intl/tests/formatter_get_locale_variant3.phpt @@ -0,0 +1,50 @@ +--TEST-- +numfmt_get_locale() +--SKIPIF-- + += 58.1'); ?> +--FILE-- + 'actual', + Locale::VALID_LOCALE => 'valid', + ); + + $res_str = ''; + + foreach( $locales as $locale ) + { + $fmt = ut_nfmt_create( $locale, NumberFormatter::DECIMAL ); + $res_str .= "$locale: "; + foreach( $loc_types as $loc_type => $loc_type_name ) + $res_str .= sprintf( " %s=%s", + $loc_type_name, + dump( ut_nfmt_get_locale( $fmt, $loc_type ) ) ); + $res_str .= "\n"; + } + + return $res_str; +} + +include_once( 'ut_common.inc' ); + +// Run the test +ut_run(); +?> +--EXPECT-- +en_UK: actual='en' valid='en' +en_US: actual='en' valid='en_US' +fr_CA: actual='fr' valid='fr_CA'