1--TEST-- 2image_type_to_mime_type() 3--FILE-- 4<?php 5 6echo "Starting image_type_to_mime_type() test\n\n"; 7 8$image_types = array ( 9 IMAGETYPE_GIF, 10 IMAGETYPE_JPEG, 11 IMAGETYPE_PNG, 12 IMAGETYPE_SWF, 13 IMAGETYPE_PSD, 14 IMAGETYPE_BMP, 15 IMAGETYPE_TIFF_II, 16 IMAGETYPE_TIFF_MM, 17 IMAGETYPE_JPC, 18 IMAGETYPE_JP2, 19 IMAGETYPE_JPX, 20 IMAGETYPE_JB2, 21 IMAGETYPE_IFF, 22 IMAGETYPE_WBMP, 23 IMAGETYPE_JPEG2000, 24 IMAGETYPE_XBM, 25 IMAGETYPE_WEBP 26); 27 28 foreach($image_types as $image_type) { 29 var_dump(image_type_to_mime_type($image_type)); 30 } 31 32echo "\nDone image_type_to_mime_type() test\n"; 33?> 34--EXPECT-- 35Starting image_type_to_mime_type() test 36 37string(9) "image/gif" 38string(10) "image/jpeg" 39string(9) "image/png" 40string(29) "application/x-shockwave-flash" 41string(9) "image/psd" 42string(9) "image/bmp" 43string(10) "image/tiff" 44string(10) "image/tiff" 45string(24) "application/octet-stream" 46string(9) "image/jp2" 47string(24) "application/octet-stream" 48string(24) "application/octet-stream" 49string(9) "image/iff" 50string(18) "image/vnd.wap.wbmp" 51string(24) "application/octet-stream" 52string(9) "image/xbm" 53string(10) "image/webp" 54 55Done image_type_to_mime_type() test 56