Update broker_set_ordering.phpt

This commit is contained in:
marcosptf 2015-08-09 07:48:51 -03:00
parent 018c412b5c
commit c2bc106608

View file

@ -3,18 +3,20 @@ enchant_broker_set_ordering() function
--CREDITS-- --CREDITS--
marcosptf - <marcosptf@yahoo.com.br> marcosptf - <marcosptf@yahoo.com.br>
--SKIPIF-- --SKIPIF--
<?php <?php
if(!extension_loaded('enchant')) die('skip, enchant not loader'); if(!extension_loaded('enchant')) die('skip, enchant not loader');
if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
?> ?>
--FILE-- --FILE--
<?php <?php
$broker = enchant_broker_init(); $broker = enchant_broker_init();
$lang = "us_US"; $dicts = enchant_broker_list_dicts($broker);
$comma = ";"; $comma = ";";
if (is_resource($broker)) { if (is_resource($broker)) {
echo("OK\n"); echo("OK\n");
if (enchant_broker_set_ordering($broker,$lang,$comma)) { if (enchant_broker_set_ordering($broker,$dicts[0]['lang_tag'],$comma)) {
echo("OK\n"); echo("OK\n");
} else { } else {
echo("enchant failed ==>" . $enchantErr); echo("enchant failed ==>" . $enchantErr);