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