summaryrefslogtreecommitdiff
path: root/ext/fileinfo/tests
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2015-02-20 10:01:00 +0100
committerOndřej Surý <ondrej@sury.org>2015-02-20 10:01:00 +0100
commit347aa01617585e89149414a9763175a19d2dc651 (patch)
tree98170e6aeca907f029fe7b5abbbd2e7f2f4a5412 /ext/fileinfo/tests
parent832b62efb8fceebb220116d8024d945a9bd31d7e (diff)
downloadphp-upstream.tar.gz
New upstream version 5.6.6+dfsgupstream
Diffstat (limited to 'ext/fileinfo/tests')
-rw-r--r--ext/fileinfo/tests/67647.movbin0 -> 144810 bytes
-rw-r--r--ext/fileinfo/tests/68731.gifbin0 -> 1130 bytes
-rw-r--r--ext/fileinfo/tests/bug67647.phpt17
-rw-r--r--ext/fileinfo/tests/bug68731.phpt14
4 files changed, 31 insertions, 0 deletions
diff --git a/ext/fileinfo/tests/67647.mov b/ext/fileinfo/tests/67647.mov
new file mode 100644
index 000000000..e119013fb
--- /dev/null
+++ b/ext/fileinfo/tests/67647.mov
Binary files differ
diff --git a/ext/fileinfo/tests/68731.gif b/ext/fileinfo/tests/68731.gif
new file mode 100644
index 000000000..328e55210
--- /dev/null
+++ b/ext/fileinfo/tests/68731.gif
Binary files differ
diff --git a/ext/fileinfo/tests/bug67647.phpt b/ext/fileinfo/tests/bug67647.phpt
new file mode 100644
index 000000000..ff8856ef5
--- /dev/null
+++ b/ext/fileinfo/tests/bug67647.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #67647: Bundled libmagic 5.17 does not detect quicktime files correctly
+--SKIPIF--
+<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
+--FILE--
+<?php
+
+$f = dirname(__FILE__) . DIRECTORY_SEPARATOR . "67647.mov";
+
+$fi = new finfo(FILEINFO_MIME_TYPE);
+var_dump($fi->file($f));
+?>
++++DONE+++
+--EXPECT--
+string(15) "video/quicktime"
++++DONE+++
+
diff --git a/ext/fileinfo/tests/bug68731.phpt b/ext/fileinfo/tests/bug68731.phpt
new file mode 100644
index 000000000..cba790925
--- /dev/null
+++ b/ext/fileinfo/tests/bug68731.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #68731 finfo_buffer doesn't extract the correct mime with some gifs
+--SKIPIF--
+<?php
+if (!class_exists('finfo'))
+ die('skip no fileinfo extension');
+--FILE--
+<?php
+ $buffer = file_get_contents(dirname(__FILE__) . '/68731.gif');
+ $finfo = finfo_open(FILEINFO_MIME_TYPE);
+ echo finfo_buffer($finfo, $buffer);
+?>
+--EXPECT--
+image/gif