dict_get_error.phpt 835 B

123456789101112131415161718192021222324252627282930313233
  1. --TEST--
  2. enchant_dict_get_error() function
  3. --CREDITS--
  4. marcosptf - <marcosptf@yahoo.com.br>
  5. --SKIPIF--
  6. <?php
  7. if(!extension_loaded('enchant')) die('skip, enchant not loader');
  8. if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
  9. if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
  10. ?>
  11. --FILE--
  12. <?php
  13. $broker = enchant_broker_init();
  14. $dicts = enchant_broker_list_dicts($broker);
  15. if (is_resource($broker)) {
  16. echo("OK\n");
  17. $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
  18. if ($requestDict) {
  19. var_dump(enchant_dict_get_error($requestDict));
  20. } else {
  21. echo("broker request dict failed\n");
  22. }
  23. } else {
  24. echo("init failed\n");
  25. }
  26. echo("OK\n");
  27. ?>
  28. --EXPECT--
  29. OK
  30. bool(false)
  31. OK