xref: /PHP-8.1/ext/enchant/tests/invalidobj.phpt (revision 74859783)
1--TEST--
2invalid object raise exception() function
3--EXTENSIONS--
4enchant
5--SKIPIF--
6<?php
7if (!is_object(enchant_broker_init())) {die("skip, resource dont load\n");}
8?>
9--FILE--
10<?php
11$broker = enchant_broker_init();
12if (is_object($broker)) {
13	echo "OK\n";
14	@enchant_broker_free($broker);
15	try {
16		@enchant_broker_free($broker);
17	} catch (ValueError $e) {
18		echo $e->getMessage()."\n";
19	}
20} else {
21	exit("init failed\n");
22}
23echo "OK\n";
24?>
25--EXPECT--
26OK
27Invalid or uninitialized EnchantBroker object
28OK
29