]> granicus.if.org Git - php/commitdiff
Update broker_set_ordering.phpt
authormarcosptf <marcosptf@yahoo.com.br>
Sun, 9 Aug 2015 10:48:51 +0000 (07:48 -0300)
committermarcosptf <marcosptf@yahoo.com.br>
Sun, 9 Aug 2015 10:48:51 +0000 (07:48 -0300)
ext/enchant/tests/broker_set_ordering.phpt

index 8e8f8e9b1473c56ef6e49a679186b20884301597..c3cb2072c995418edf1e5c3912becbd4e06d2b7f 100644 (file)
@@ -3,18 +3,20 @@ enchant_broker_set_ordering() function
 --CREDITS--
 marcosptf - <marcosptf@yahoo.com.br>
 --SKIPIF--
-<?php 
+<?php
 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--
 <?php
 $broker = enchant_broker_init();
-$lang = "us_US";
+$dicts = enchant_broker_list_dicts($broker);
 $comma = ";";
 
 if (is_resource($broker)) {
     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");
     } else {
         echo("enchant failed ==>" . $enchantErr);