1--TEST-- 2Test image_type_to_mime_type() function : error conditions - Pass incorrect number of arguments 3--FILE-- 4<?php 5/* Prototype : proto string image_type_to_mime_type(int imagetype) 6 * Description: Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype 7 * Source code: ext/standard/image.c 8 */ 9 10$imagetype = IMAGETYPE_GIF; 11$extra_arg = 10; 12echo "*** Testing image_type_to_mime_type() : error conditions ***\n"; 13 14// Zero arguments 15echo "\n-- Testing image_type_to_mime_type() function with Zero arguments --\n"; 16var_dump( image_type_to_mime_type() ); 17 18//Test image_type_to_mime_type with one more than the expected number of arguments 19echo "\n-- Testing image_type_to_mime_type() function with more than expected no. of arguments --\n"; 20var_dump( image_type_to_mime_type($imagetype, $extra_arg) ); 21?> 22===DONE=== 23--EXPECTF-- 24*** Testing image_type_to_mime_type() : error conditions *** 25 26-- Testing image_type_to_mime_type() function with Zero arguments -- 27 28Warning: image_type_to_mime_type() expects exactly 1 parameter, 0 given in %simage_type_to_mime_type_error.php on line 13 29NULL 30 31-- Testing image_type_to_mime_type() function with more than expected no. of arguments -- 32 33Warning: image_type_to_mime_type() expects exactly 1 parameter, 2 given in %simage_type_to_mime_type_error.php on line 17 34NULL 35===DONE===