mirror of
https://github.com/php/php-src.git
synced 2024-11-30 21:35:36 +08:00
bd9f4fa676
For rationale, see https://github.com/php/php-src/pull/6787 Make extension checks lowercase, add a special case for opcache that has internal name not matching .so filename. Extensions migrated in part 2: * dom * exif * fileinfo * ffi
27 lines
621 B
PHP
27 lines
621 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 ) );
|
|
|
|
finfo_close( $finfo );
|
|
|
|
// 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)
|