aboutsummaryrefslogtreecommitdiffstats
path: root/tests/upload/filespec_test.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-02-05 13:37:34 +0100
committerMarc Alexander <admin@m-a-styles.de>2015-02-05 13:37:34 +0100
commit48b64b0a61901094668bfc8ae3db6ba1867e5e89 (patch)
treea9b3b164b5f0fd4f5e30c7f6714c49ecedac3789 /tests/upload/filespec_test.php
parentc1d644769f991604aa783f55c93984778a565eb4 (diff)
downloadforums-48b64b0a61901094668bfc8ae3db6ba1867e5e89.tar
forums-48b64b0a61901094668bfc8ae3db6ba1867e5e89.tar.gz
forums-48b64b0a61901094668bfc8ae3db6ba1867e5e89.tar.bz2
forums-48b64b0a61901094668bfc8ae3db6ba1867e5e89.tar.xz
forums-48b64b0a61901094668bfc8ae3db6ba1867e5e89.zip
[ticket/13577] Skip filespec test requiring mimetype check on windows
PHPBB3-13577
Diffstat (limited to 'tests/upload/filespec_test.php')
-rw-r--r--tests/upload/filespec_test.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/upload/filespec_test.php b/tests/upload/filespec_test.php
index d8fa82e2b5..05547dcd00 100644
--- a/tests/upload/filespec_test.php
+++ b/tests/upload/filespec_test.php
@@ -266,6 +266,11 @@ class phpbb_filespec_test extends phpbb_test_case
*/
public function test_is_image_get_mimetype($filename, $mimetype, $expected)
{
+ if (!class_exists('finfo') && strtolower(substr(PHP_OS, 0, 3)) === 'win')
+ {
+ $this->markTestSkipped('Unable to test mimetype guessing without fileinfo support on Windows');
+ }
+
$filespec = $this->get_filespec(array('tmp_name' => $this->path . $filename, 'type' => $mimetype));
$filespec->get_mimetype($this->path . $filename);
$this->assertEquals($expected, $filespec->is_image());