Annotation of embedaddon/php/ext/enchant/tests/broker_request_dict.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: enchant_broker_request_dict() function
! 3: --SKIPIF--
! 4: <?php
! 5: if(!extension_loaded('enchant')) die('skip, enchant not loader');
! 6: ?>
! 7: --FILE--
! 8: <?php
! 9: $broker = enchant_broker_init();
! 10: if (!is_resource($broker)) {
! 11: exit("init failed\n");
! 12: }
! 13:
! 14: $dicts = enchant_broker_list_dicts($broker);
! 15: if (is_array($dicts)) {
! 16: if (count($dicts)) {
! 17: $dict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
! 18: if (is_resource($dict)) {
! 19: echo "OK\n";
! 20: } else {
! 21: echo "fail to request " . $dicts[0]['lang_tag'];
! 22: }
! 23: }
! 24: } else {
! 25: exit("list dicts failed\n");
! 26: }
! 27: echo "OK\n";
! 28: ?>
! 29: --EXPECT--
! 30: OK
! 31: OK
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>