php-src/ext/intl/tests/msgfmt_get_locale.phpt
Gustavo André dos Santos Lopes 9762609cec Remove executable bit from files
2012-07-30 10:25:17 +02:00

41 lines
623 B
PHP

--TEST--
msgfmt_get_locale()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
--FILE--
<?php
/*
* Get locale.
*/
function ut_main()
{
$locales = array(
'en_UK',
'en_US@California',
'uk',
);
$res_str = '';
foreach( $locales as $locale )
{
$fmt = ut_msgfmt_create( $locale, "Test" );
$res_str .= "$locale: " . dump( ut_msgfmt_get_locale( $fmt ) );
$res_str .= "\n";
}
return $res_str;
}
include_once( 'ut_common.inc' );
// Run the test
ut_run();
?>
--EXPECT--
en_UK: 'en_UK'
en_US@California: 'en_US@California'
uk: 'uk'