[ticket/13577] Skip filespec test requiring mimetype check on windows

PHPBB3-13577
This commit is contained in:
Marc Alexander 2015-02-05 13:37:34 +01:00
parent c1d644769f
commit 48b64b0a61

View file

@ -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());