1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
--TEST--
Test finfo_close() function : error conditions
--EXTENSIONS--
fileinfo
--FILE--
<?php
echo "*** Testing finfo_close() : error conditions ***\n";
echo "\n-- Testing finfo_close() function with wrong resource type --\n";
$fp = fopen( __FILE__, 'r' );
try {
var_dump( finfo_close( $fp ) );
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
*** Testing finfo_close() : error conditions ***
-- Testing finfo_close() function with wrong resource type --
finfo_close(): Argument #1 ($finfo) must be of type finfo, resource given
|