]> granicus.if.org Git - php/commitdiff
Create broker_list_dicts.phpt
authormarcosptf <marcosptf@yahoo.com.br>
Fri, 7 Aug 2015 14:31:25 +0000 (11:31 -0300)
committermarcosptf <marcosptf@yahoo.com.br>
Fri, 7 Aug 2015 14:31:25 +0000 (11:31 -0300)
ext/enchant/tests/broker_list_dicts.phpt [new file with mode: 0644]

diff --git a/ext/enchant/tests/broker_list_dicts.phpt b/ext/enchant/tests/broker_list_dicts.phpt
new file mode 100644 (file)
index 0000000..5986ddf
--- /dev/null
@@ -0,0 +1,32 @@
+--TEST--
+enchant_broker_list_dicts() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php 
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+if (is_resource($broker)) {
+    var_dump(enchant_broker_list_dicts($broker));
+} else {
+    exit("init failed\n");
+}
+
+?>
+--EXPECTF--
+array(%d) {
+  [%d]=>
+  array(%d) {
+    ["lang_tag"]=>
+    string(%d) "en_US"
+    ["provider_name"]=>
+    string(%d) "myspell"
+    ["provider_desc"]=>
+    string(%d) "Myspell Provider"
+    ["provider_file"]=>
+    string(%d) "/usr/lib64/enchant/libenchant_myspell.so"
+  }
+}