com php-src: add test for FILEINFO_EXTENSION flag: ext/ fileinfo/tests/finfo_extension_flag.phpt
| From: | Anatol Belski | Date: | Thu, 24 Nov 2016 17:05:11 +0000 |
| Subject: | com php-src: add test for FILEINFO_EXTENSION flag: ext/ fileinfo/tests/finfo_extension_flag.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-96022@lists.php.net to get a copy of this message | ||
Commit: 99c7ad7aa8af59bde9285470c53f26f48a027db0
Author: Anatol Belski <ab@php.net> Thu, 24 Nov 2016 18:05:11 +0100
Parents: 52f5b9659fa27936d8271c4d7a6874269fbf9534
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=99c7ad7aa8af59bde9285470c53f26f48a027db0
Log:
add test for FILEINFO_EXTENSION flag
Changed paths:
A ext/fileinfo/tests/finfo_extension_flag.phpt
Diff:
diff --git a/ext/fileinfo/tests/finfo_extension_flag.phpt
b/ext/fileinfo/tests/finfo_extension_flag.phpt
new file mode 100644
index 0000000...fdecef3
--- /dev/null
+++ b/ext/fileinfo/tests/finfo_extension_flag.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Test FILEINFO_EXTENSION flag
+--SKIPIF--
+<?php
+if (!class_exists('finfo'))
+ die('skip no fileinfo extension');
+--FILE--
+<?php
+
+$f = new finfo;
+var_dump($f->file(dirname(__FILE__) . "/resources/test.jpg", FILEINFO_EXTENSION));
+
+?>
+===DONE===
+--EXPECT--
+string(17) "jpeg/jpg/jpe/jfif"
+===DONE===
+