xref: /PHP-8.2/ext/fileinfo/tests/bug57547.phpt (revision bd9f4fa6)
1--TEST--
2Bug #57547 Settings options on file doesn't give same result as constructor options
3--EXTENSIONS--
4fileinfo
5--FILE--
6<?php
7
8$filenames = array("..", __FILE__);
9
10foreach ($filenames as $filename) {
11    $finfo = new finfo(FILEINFO_MIME);
12    var_dump($finfo->file($filename));
13
14    $finfo2 = new finfo();
15    var_dump($finfo2->file($filename, FILEINFO_MIME));
16}
17
18?>
19--EXPECT--
20string(9) "directory"
21string(9) "directory"
22string(28) "text/x-php; charset=us-ascii"
23string(28) "text/x-php; charset=us-ascii"
24