1--TEST-- 2get_error_message() 3--EXTENSIONS-- 4intl 5--FILE-- 6<?php 7 8/* 9 * Retrieve error message. 10 */ 11 12 13function 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 31include_once( 'ut_common.inc' ); 32ut_run(); 33?> 34--EXPECT-- 35U_ZERO_ERROR 36Error getting attribute value: U_ILLEGAL_ARGUMENT_ERROR 37