Annotation of embedaddon/php/ext/intl/tests/msgfmt_get_locale.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: msgfmt_get_locale()
                      3: --SKIPIF--
                      4: <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
                      5: --FILE--
                      6: <?php
                      7: 
                      8: /*
                      9:  * Get locale.
                     10:  */
                     11: 
                     12: function ut_main()
                     13: {
                     14:     $locales = array(
                     15:         'en_UK',
                     16:         'en_US@California',
                     17:         'uk',
                     18:     );
                     19: 
                     20:     $res_str = '';
                     21: 
                     22:     foreach( $locales as $locale )
                     23:     {
                     24:         $fmt = ut_msgfmt_create( $locale, "Test" );
                     25:         $res_str .= "$locale: " . dump( ut_msgfmt_get_locale( $fmt ) );
                     26:         $res_str .= "\n";
                     27:     }
                     28: 
                     29:     return $res_str;
                     30: }
                     31: 
                     32: include_once( 'ut_common.inc' );
                     33: 
                     34: // Run the test
                     35: ut_run();
                     36: ?>
                     37: --EXPECT--
                     38: en_UK: 'en_UK'
                     39: en_US@California: 'en_US@California'
                     40: uk: 'uk'

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>