bug53070.phpt 939 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. Bug #53070 (enchant_broker_get_path crashes if no path is set)
  3. --EXTENSIONS--
  4. enchant
  5. --SKIPIF--
  6. <?php
  7. if (!is_object(enchant_broker_init())) {die("skip, resource dont load\n");}
  8. if (defined("LIBENCHANT_VERSION") && version_compare(LIBENCHANT_VERSION, "2", ">")) die('skip libenchant v1 only');
  9. ?>
  10. --FILE--
  11. <?php
  12. $broker = enchant_broker_init();
  13. var_dump(enchant_broker_get_dict_path($broker, ENCHANT_MYSPELL));
  14. var_dump(enchant_broker_get_dict_path($broker, ENCHANT_ISPELL));
  15. ?>
  16. --EXPECTF--
  17. Deprecated: Constant ENCHANT_MYSPELL is deprecated in %s
  18. Deprecated: Function enchant_broker_get_dict_path() is deprecated in %s
  19. Warning: enchant_broker_get_dict_path(): dict_path not set in %s on line %d
  20. bool(false)
  21. Deprecated: Constant ENCHANT_ISPELL is deprecated in %s
  22. Deprecated: Function enchant_broker_get_dict_path() is deprecated in %s
  23. Warning: enchant_broker_get_dict_path(): dict_path not set in %s on line %d
  24. bool(false)