mirror of
https://github.com/php/php-src.git
synced 2026-03-27 01:32:22 +01:00
add test for bug #57547
This commit is contained in:
27
ext/fileinfo/tests/bug57547.phpt
Normal file
27
ext/fileinfo/tests/bug57547.phpt
Normal file
@@ -0,0 +1,27 @@
|
||||
--TEST--
|
||||
Bug #57547 Settings options on file doesn't give same result as constructor options
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!class_exists('finfo'))
|
||||
die('skip no fileinfo extension');
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$filenames = array("..", __FILE__);
|
||||
|
||||
foreach ($filenames as $filename) {
|
||||
$finfo = new finfo(FILEINFO_MIME);
|
||||
var_dump($finfo->file($filename));
|
||||
|
||||
$finfo2 = new finfo();
|
||||
var_dump($finfo2->file($filename, FILEINFO_MIME));
|
||||
}
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
string(9) "directory"
|
||||
string(9) "directory"
|
||||
string(28) "text/x-php; charset=us-ascii"
|
||||
string(28) "text/x-php; charset=us-ascii"
|
||||
===DONE===
|
||||
Reference in New Issue
Block a user