1--TEST--
2image_type_to_mime_type()
3--SKIPIF--
4<?php
5	if (!function_exists('image_type_to_mime_type')) die('skip image_type_to_mime_type() not available');
6?>
7--FILE--
8<?php
9
10/* Prototype  : string image_type_to_mime_type  ( int $imagetype  )
11 * Description: Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype.
12 * Source code: ext/standard/image.c
13 * Alias to functions:
14 */
15
16echo "Starting image_type_to_mime_type() test\n\n";
17
18$image_types = array (
19	IMAGETYPE_GIF,
20	IMAGETYPE_JPEG,
21	IMAGETYPE_PNG,
22	IMAGETYPE_SWF,
23	IMAGETYPE_PSD,
24	IMAGETYPE_BMP,
25	IMAGETYPE_TIFF_II,
26	IMAGETYPE_TIFF_MM,
27	IMAGETYPE_JPC,
28	IMAGETYPE_JP2,
29	IMAGETYPE_JPX,
30	IMAGETYPE_JB2,
31	IMAGETYPE_IFF,
32	IMAGETYPE_WBMP,
33	IMAGETYPE_JPEG2000,
34	IMAGETYPE_XBM,
35	IMAGETYPE_WEBP
36);
37
38	foreach($image_types as $image_type) {
39		var_dump(image_type_to_mime_type($image_type));
40	}
41
42echo "\nDone image_type_to_mime_type() test\n";
43?>
44--EXPECT--
45Starting image_type_to_mime_type() test
46
47string(9) "image/gif"
48string(10) "image/jpeg"
49string(9) "image/png"
50string(29) "application/x-shockwave-flash"
51string(9) "image/psd"
52string(14) "image/x-ms-bmp"
53string(10) "image/tiff"
54string(10) "image/tiff"
55string(24) "application/octet-stream"
56string(9) "image/jp2"
57string(24) "application/octet-stream"
58string(24) "application/octet-stream"
59string(9) "image/iff"
60string(18) "image/vnd.wap.wbmp"
61string(24) "application/octet-stream"
62string(9) "image/xbm"
63string(10) "image/webp"
64
65Done image_type_to_mime_type() test
66