dict_describe.phpt 952 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --TEST--
  2. enchant_dict_describe() function
  3. --CREDITS--
  4. marcosptf - <marcosptf@yahoo.com.br>
  5. --EXTENSIONS--
  6. enchant
  7. --SKIPIF--
  8. <?php
  9. if (!is_object(enchant_broker_init())) {die("skip, resource dont load\n");}
  10. if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, no dictionary installed on this machine! \n");}
  11. ?>
  12. --FILE--
  13. <?php
  14. $broker = enchant_broker_init();
  15. $dicts = enchant_broker_list_dicts($broker);
  16. if (is_object($broker)) {
  17. echo("OK\n");
  18. $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
  19. if ($requestDict) {
  20. echo("OK\n");
  21. $dictDescribe = enchant_dict_describe($requestDict);
  22. if (is_array($dictDescribe)) {
  23. echo("OK\n");
  24. } else {
  25. echo("broker request dict failed\n");
  26. }
  27. } else {
  28. echo("broker request dict failed\n");
  29. }
  30. } else {
  31. echo("broker is not a resource; failed;\n");
  32. }
  33. ?>
  34. --EXPECT--
  35. OK
  36. OK
  37. OK