com php-src: Update dict_check.phpt: ext/enchant/tests/ dict_check.phpt
| From: | Xinchen Hui | Date: | Sun, 09 Aug 2015 10:56:23 +0000 |
| Subject: | com php-src: Update dict_check.phpt: ext/enchant/tests/ dict_check.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88417@lists.php.net to get a copy of this message | ||
Commit: 4129b50d2361b0f34f29eb9248532815db990915
Author: marcosptf <marcosptf@yahoo.com.br> Sun, 9 Aug 2015 07:56:23 -0300
Parents: 1cb530058e3fe94a44eb0e5f673aa4448d2873ab
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4129b50d2361b0f34f29eb9248532815db990915
Log:
Update dict_check.phpt
Changed paths:
M ext/enchant/tests/dict_check.phpt
Diff:
diff --git a/ext/enchant/tests/dict_check.phpt b/ext/enchant/tests/dict_check.phpt
index 003855d..75e7790 100644
--- a/ext/enchant/tests/dict_check.phpt
+++ b/ext/enchant/tests/dict_check.phpt
@@ -5,16 +5,18 @@ marcosptf - <marcosptf@yahoo.com.br>
--SKIPIF--
<?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 = "en_EN";
+$dicts = enchant_broker_list_dicts($broker);
$newWord = "java";
if (is_resource($broker)) {
echo("OK\n");
- $requestDict = enchant_broker_request_dict($broker,$lang);
+ $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
if ($requestDict) {
echo("OK\n");