image_type_to_mime_type_error.phpt [plain text]
--TEST--
Test image_type_to_mime_type() function : error conditions - Pass incorrect number of arguments
--FILE--
<?php
$imagetype = IMAGETYPE_GIF;
$extra_arg = 10;
echo "*** Testing image_type_to_mime_type() : error conditions ***\n";
echo "\n-- Testing image_type_to_mime_type() function with Zero arguments --\n";
var_dump( image_type_to_mime_type() );
echo "\n-- Testing image_type_to_mime_type() function with more than expected no. of arguments --\n";
var_dump( image_type_to_mime_type($imagetype, $extra_arg) );
?>
===DONE===
--EXPECTF--
*** Testing image_type_to_mime_type() : error conditions ***
-- Testing image_type_to_mime_type() function with Zero arguments --
Warning: image_type_to_mime_type() expects exactly 1 parameter, 0 given in %simage_type_to_mime_type_error.php on line 13
NULL
-- Testing image_type_to_mime_type() function with more than expected no. of arguments --
Warning: image_type_to_mime_type() expects exactly 1 parameter, 2 given in %simage_type_to_mime_type_error.php on line 17
NULL
===DONE===