1--TEST-- 2get/set_attribute() 3--SKIPIF-- 4<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> 5--FILE-- 6<?php 7 8/* 9 * Try to set/get a collation attribute. 10 */ 11 12 13/* 14 * Return current normalication mode. 15 */ 16function check_val( $coll ) 17{ 18 $val = ut_coll_get_attribute( $coll, Collator::NORMALIZATION_MODE ); 19 return sprintf( "%s\n", ( $val == Collator::OFF ? "off" : "on" ) ); 20} 21 22function ut_main() 23{ 24 $res = ''; 25 $coll = ut_coll_create( 'en_US' ); 26 27 ut_coll_set_attribute( $coll, Collator::NORMALIZATION_MODE, Collator::OFF ); 28 $res .= check_val( $coll ); 29 30 ut_coll_set_attribute( $coll, Collator::NORMALIZATION_MODE, Collator::ON ); 31 $res .= check_val( $coll ); 32 33 return $res; 34} 35 36include( 'ut_common.inc' ); 37ut_run(); 38?> 39--EXPECT-- 40off 41on 42