mirror of
https://github.com/php/php-src.git
synced 2026-04-21 15:08:16 +02:00
a555cc0b3d
Remove most of the `===DONE===` tags and its variations. Keep `===DONE===` if the test output otherwise becomes empty. Closes GH-4872.
29 lines
752 B
PHP
29 lines
752 B
PHP
--TEST--
|
|
Test finfo_close() function : error conditions
|
|
--SKIPIF--
|
|
<?php require_once(__DIR__ . '/skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
/* Prototype : resource finfo_close(resource finfo)
|
|
* Description: Close fileinfo resource.
|
|
* Source code: ext/fileinfo/fileinfo.c
|
|
* Alias to functions:
|
|
*/
|
|
|
|
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(): supplied resource is not a valid file_info resource
|