summaryrefslogtreecommitdiff
path: root/ext/enchant
diff options
context:
space:
mode:
authormarcosptf <marcosptf@yahoo.com.br>2015-08-09 07:48:51 -0300
committermarcosptf <marcosptf@yahoo.com.br>2015-08-09 07:48:51 -0300
commitc2bc1066082ab2d419e8596516547983666022cd (patch)
treed04d164980883f887f90ebbbdfa686fe2b6291ee /ext/enchant
parent018c412b5c46012dc34f57bf0d9f37998a0804b0 (diff)
downloadphp-git-c2bc1066082ab2d419e8596516547983666022cd.tar.gz
Update broker_set_ordering.phpt
Diffstat (limited to 'ext/enchant')
-rw-r--r--ext/enchant/tests/broker_set_ordering.phpt8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/enchant/tests/broker_set_ordering.phpt b/ext/enchant/tests/broker_set_ordering.phpt
index 8e8f8e9b14..c3cb2072c9 100644
--- a/ext/enchant/tests/broker_set_ordering.phpt
+++ b/ext/enchant/tests/broker_set_ordering.phpt
@@ -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);