mirror of
https://github.com/php/php-src.git
synced 2026-04-24 00:18:23 +02:00
7485978339
This is an automated migration of most SKIPIF extension_loaded checks.
29 lines
504 B
PHP
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
|