1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Files
archived-php-src/ext/fileinfo/tests/finfo_close_error.phpt
T
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

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