Annotation of embedaddon/php/ext/intl/tests/collator_get_error_message.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: get_error_message()
3: --SKIPIF--
4: <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
5: --FILE--
6: <?php
7:
8: /*
9: * Retreive error message.
10: */
11:
12:
13: function ut_main()
14: {
15: $res = '';
16: $coll = ut_coll_create( 'ru_RU' );
17:
18: // Try specifying a correct attribute.
19: ut_coll_get_attribute( $coll, Collator::NORMALIZATION_MODE );
20: $status = ut_coll_get_error_message( $coll );
21: $res .= $status . "\n";
22:
23: // Try specifying an incorrect attribute.
24: ut_coll_get_attribute( $coll, 12345 );
25: $status = ut_coll_get_error_message( $coll );
26: $res .= $status . "\n";
27:
28: return $res;
29: }
30:
31: include_once( 'ut_common.inc' );
32: ut_run();
33: ?>
34: --EXPECT--
35: U_ZERO_ERROR
36: Error getting attribute value: U_ILLEGAL_ARGUMENT_ERROR
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>