From: Zoe Slattery Date: Tue, 10 Jun 2008 18:31:37 +0000 (+0000) Subject: Written by Sanjay Mantoor and reviewed by Pierre. X-Git-Tag: BEFORE_HEAD_NS_CHANGE~1557 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc84bcc19c5bfbd58cdcb6dfbbc4619b01c9e151;p=php Written by Sanjay Mantoor and reviewed by Pierre. --- diff --git a/ext/gd/tests/gd_info_error.phpt b/ext/gd/tests/gd_info_error.phpt new file mode 100644 index 0000000000..15a26e4a49 --- /dev/null +++ b/ext/gd/tests/gd_info_error.phpt @@ -0,0 +1,38 @@ +--TEST-- +Test gd_info() function : error conditions - with more than expected number of arguments +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing gd_info() : error conditions *** + +-- Testing gd_info() function with more than expected number of arguments -- + +Warning: gd_info() expects exactly 0 parameters, 1 given in %s on line %d +bool(false) + +Warning: gd_info() expects exactly 0 parameters, 2 given in %s on line %d +bool(false) +===DONE=== \ No newline at end of file diff --git a/ext/gd/tests/image_type_to_mime_type_error.phpt b/ext/gd/tests/image_type_to_mime_type_error.phpt new file mode 100644 index 0000000000..6ffdd43171 --- /dev/null +++ b/ext/gd/tests/image_type_to_mime_type_error.phpt @@ -0,0 +1,35 @@ +--TEST-- +Test image_type_to_mime_type() function : error conditions - Pass incorrect number of arguments +--FILE-- + +===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 %s on line %d +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 %s on line %d +NULL +===DONE=== \ No newline at end of file diff --git a/ext/gd/tests/image_type_to_mime_type_variation2.phpt b/ext/gd/tests/image_type_to_mime_type_variation2.phpt new file mode 100644 index 0000000000..159e7cf53f --- /dev/null +++ b/ext/gd/tests/image_type_to_mime_type_variation2.phpt @@ -0,0 +1,119 @@ +--TEST-- +Test image_type_to_mime_type() function : usage variations - Pass decimal, octal, and hexadecimal values as imagetype +--FILE-- + +===DONE=== +--EXPECT-- +*** Testing image_type_to_mime_type() : usage variations *** + +-- Iteration 1 -- +string(24) "application/octet-stream" + +-- Iteration 2 -- +string(9) "image/gif" + +-- Iteration 3 -- +string(24) "application/octet-stream" + +-- Iteration 4 -- +string(24) "application/octet-stream" + +-- Iteration 5 -- +string(10) "image/jpeg" + +-- Iteration 6 -- +string(10) "image/tiff" + +-- Iteration 7 -- +string(24) "application/octet-stream" + +-- Iteration 8 -- +string(24) "application/octet-stream" + +-- Iteration 9 -- +string(24) "application/octet-stream" + +-- Iteration 10 -- +string(9) "image/gif" + +-- Iteration 11 -- +string(24) "application/octet-stream" + +-- Iteration 12 -- +string(24) "application/octet-stream" +===DONE=== +--UEXPECT-- +*** Testing image_type_to_mime_type() : usage variations *** + +-- Iteration 1 -- +unicode(24) "application/octet-stream" + +-- Iteration 2 -- +unicode(9) "image/gif" + +-- Iteration 3 -- +unicode(24) "application/octet-stream" + +-- Iteration 4 -- +unicode(24) "application/octet-stream" + +-- Iteration 5 -- +unicode(10) "image/jpeg" + +-- Iteration 6 -- +unicode(10) "image/tiff" + +-- Iteration 7 -- +unicode(24) "application/octet-stream" + +-- Iteration 8 -- +unicode(24) "application/octet-stream" + +-- Iteration 9 -- +unicode(24) "application/octet-stream" + +-- Iteration 10 -- +unicode(9) "image/gif" + +-- Iteration 11 -- +unicode(24) "application/octet-stream" + +-- Iteration 12 -- +unicode(24) "application/octet-stream" +===DONE===