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

index 15ba5da6b295ae75be2b7ed614e8c359e357a854..5fe22dc3dda1ae011c74a50623fc5dd37f482e12 100644 (file)
@@ -3,18 +3,16 @@ enchant_broker_dict_exists() 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");}
 ?>
 --FILE--
 <?php
-$lang="en_US";
 $broker = enchant_broker_init();
-if (!is_resource($broker)) {
-    exit("init failed\n");
-}
+$dicts = enchant_broker_list_dicts($broker);
 
-if (enchant_broker_dict_exists($broker,$lang)) {
+if (enchant_broker_dict_exists($broker, $dicts[0]['lang_tag'])) {
     echo("OK\n");
 } else {
     echo("dicts dont exist failed\n");