1--TEST--
2Test finfo_close() function : error conditions
3--SKIPIF--
4<?php require_once(__DIR__ . '/skipif.inc'); ?>
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(): supplied resource is not a valid file_info resource
23