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