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