summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2016-11-24 19:27:50 +0100
committerAnatol Belski <ab@php.net>2016-11-24 19:27:50 +0100
commitc26e96a05d3fcdb13a7bbe8551155ca2f820e3a3 (patch)
treeabaee85812884487b07125a04edb43ea58b39e37
parentec366eac5fa90e3a2f1560bbec9f3c6d73914b27 (diff)
parenta36dd1dfd8cf807d31aa9acc2f092b532a45bb15 (diff)
downloadphp-git-c26e96a05d3fcdb13a7bbe8551155ca2f820e3a3.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: add test for bug #57547
-rw-r--r--ext/fileinfo/tests/bug57547.phpt27
1 files changed, 27 insertions, 0 deletions
diff --git a/ext/fileinfo/tests/bug57547.phpt b/ext/fileinfo/tests/bug57547.phpt
new file mode 100644
index 0000000000..512d4c030a
--- /dev/null
+++ b/ext/fileinfo/tests/bug57547.phpt
@@ -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===