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