1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/fileinfo/tests/finfo_set_flags_basic.phpt
Tim Düsterhus 7831f65f83 fileinfo: Stop calling finfo_close() in tests (#18405)
This function is a noop and will be proposed for deprecation. This patch
removes the useless calls.
2025-04-23 18:57:32 +02:00

25 lines
597 B
PHP

--TEST--
Test finfo_set_flags() function : basic functionality
--EXTENSIONS--
fileinfo
--FILE--
<?php
$magicFile = __DIR__ . DIRECTORY_SEPARATOR . 'magic';
$finfo = finfo_open( FILEINFO_MIME, $magicFile );
echo "*** Testing finfo_set_flags() : basic functionality ***\n";
var_dump( finfo_set_flags( $finfo, FILEINFO_NONE ) );
var_dump( finfo_set_flags( $finfo, FILEINFO_SYMLINK ) );
// OO way
$finfo = new finfo( FILEINFO_NONE, $magicFile );
var_dump( $finfo->set_flags( FILEINFO_MIME ) );
?>
--EXPECT--
*** Testing finfo_set_flags() : basic functionality ***
bool(true)
bool(true)
bool(true)