1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 13:01:02 +02:00
Files
archived-php-src/ext/fileinfo/tests/finfo_close_basic.phpt
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

34 lines
795 B
PHP

--TEST--
Test finfo_close() function : basic functionality
--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() : basic functionality ***\n";
$magicFile = __DIR__ . DIRECTORY_SEPARATOR . 'magic';
$finfo = finfo_open( FILEINFO_MIME, $magicFile );
var_dump( $finfo );
// Calling finfo_close() with all possible arguments
var_dump( finfo_close($finfo) );
$finfo = new finfo( FILEINFO_MIME, $magicFile );
var_dump( $finfo );
unset( $finfo );
?>
--EXPECTF--
*** Testing finfo_close() : basic functionality ***
resource(%d) of type (file_info)
bool(true)
object(finfo)#%d (%d) {
}