1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 00:18:23 +02:00
Files
archived-php-src/ext/enchant/tests/invalidobj.phpt
T
Nikita Popov 7485978339 Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00

29 lines
504 B
PHP

--TEST--
invalid object raise exception() function
--EXTENSIONS--
enchant
--SKIPIF--
<?php
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