php-src/ext/fileinfo/tests/finfo_close_basic.phpt
2009-03-15 23:17:28 +00:00

36 lines
842 B
PHP

--TEST--
Test finfo_close() function : basic functionality
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/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 = dirname( __FILE__ ) . 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 );
?>
===DONE===
--EXPECTF--
*** Testing finfo_close() : basic functionality ***
resource(%d) of type (file_info)
bool(true)
object(finfo)#%d (%d) {
}
===DONE===