[ticket/10941] Fixed a failing test

Since the is_image change, the filespec class no longer trusts the
browser's reported mimetype and instead checks the file itself. Thus
pretending a text file had the mimetype of an image will no longer
fail, the file will simply not be treated as an image.

PHPBB3-10941
This commit is contained in:
Fyorl 2012-07-08 01:24:27 +01:00
parent b65f08dd95
commit af8020b388

View file

@ -237,7 +237,7 @@ class phpbb_filespec_test extends phpbb_test_case
return array( return array(
array('gif_copy', 'gif_moved', 'image/gif', 'gif', false, true), array('gif_copy', 'gif_moved', 'image/gif', 'gif', false, true),
array('non_existant', 'still_non_existant', 'text/plain', 'txt', 'GENERAL_UPLOAD_ERROR', false), array('non_existant', 'still_non_existant', 'text/plain', 'txt', 'GENERAL_UPLOAD_ERROR', false),
array('txt_copy', 'txt_as_img', 'image/jpg', 'txt', 'UNABLE_GET_IMAGE_SIZE', true), array('txt_copy', 'txt_as_img', 'image/jpg', 'txt', false, true),
array('txt_copy_2', 'txt_moved', 'text/plain', 'txt', false, true), array('txt_copy_2', 'txt_moved', 'text/plain', 'txt', false, true),
array('jpg_copy', 'jpg_moved', 'image/png', 'jpg', false, true), array('jpg_copy', 'jpg_moved', 'image/png', 'jpg', false, true),
array('png_copy', 'png_moved', 'image/png', 'jpg', 'IMAGE_FILETYPE_MISMATCH', true), array('png_copy', 'png_moved', 'image/png', 'jpg', 'IMAGE_FILETYPE_MISMATCH', true),