diff options
author | Ondřej Surý <ondrej@sury.org> | 2015-02-20 10:01:00 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2015-02-20 10:01:00 +0100 |
commit | 347aa01617585e89149414a9763175a19d2dc651 (patch) | |
tree | 98170e6aeca907f029fe7b5abbbd2e7f2f4a5412 /ext/fileinfo/tests | |
parent | 832b62efb8fceebb220116d8024d945a9bd31d7e (diff) | |
download | php-upstream.tar.gz |
New upstream version 5.6.6+dfsgupstream
Diffstat (limited to 'ext/fileinfo/tests')
-rw-r--r-- | ext/fileinfo/tests/67647.mov | bin | 0 -> 144810 bytes | |||
-rw-r--r-- | ext/fileinfo/tests/68731.gif | bin | 0 -> 1130 bytes | |||
-rw-r--r-- | ext/fileinfo/tests/bug67647.phpt | 17 | ||||
-rw-r--r-- | ext/fileinfo/tests/bug68731.phpt | 14 |
4 files changed, 31 insertions, 0 deletions
diff --git a/ext/fileinfo/tests/67647.mov b/ext/fileinfo/tests/67647.mov Binary files differnew file mode 100644 index 000000000..e119013fb --- /dev/null +++ b/ext/fileinfo/tests/67647.mov diff --git a/ext/fileinfo/tests/68731.gif b/ext/fileinfo/tests/68731.gif Binary files differnew file mode 100644 index 000000000..328e55210 --- /dev/null +++ b/ext/fileinfo/tests/68731.gif 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 |