com php-src: new test refactor: ext/enchant/tests/broker_dict _exists.phpt
| From: | Xinchen Hui | Date: | Sun, 09 Aug 2015 10:23:07 +0000 |
| Subject: | com php-src: new test refactor: ext/enchant/tests/broker_dict _exists.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88424@lists.php.net to get a copy of this message | ||
Commit: 158aca848a0a3978e433733140c66006481db14f
Author: marcosptf <marcosptf@yahoo.com.br> Sun, 9 Aug 2015 07:23:07 -0300
Parents: 55f9427688f35309696751a13f9ba6d4e134e6cc
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=158aca848a0a3978e433733140c66006481db14f
Log:
new test refactor
Changed paths:
M ext/enchant/tests/broker_dict_exists.phpt
Diff:
diff --git a/ext/enchant/tests/broker_dict_exists.phpt b/ext/enchant/tests/broker_dict_exists.phpt
index 15ba5da..5fe22dc 100644
--- a/ext/enchant/tests/broker_dict_exists.phpt
+++ b/ext/enchant/tests/broker_dict_exists.phpt
@@ -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");