From 562cb168f15bb74d0161b3698d7ed1b52d8155ea Mon Sep 17 00:00:00 2001 From: Zoe Slattery Date: Tue, 10 Jun 2008 18:29:48 +0000 Subject: [PATCH] Written by Sanjay Mantoor and reviewed by Pierre. --- ext/gd/tests/gd_info_error.phpt | 38 +++++++++ .../tests/image_type_to_mime_type_error.phpt | 35 ++++++++ .../image_type_to_mime_type_variation2.phpt | 80 +++++++++++++++++++ 3 files changed, 153 insertions(+) create mode 100644 ext/gd/tests/gd_info_error.phpt create mode 100644 ext/gd/tests/image_type_to_mime_type_error.phpt create mode 100644 ext/gd/tests/image_type_to_mime_type_variation2.phpt 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..5ecdce77c6 --- /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: Wrong parameter count for image_type_to_mime_type() in %s on line %d +bool(false) + +-- Testing image_type_to_mime_type() function with more than expected no. of arguments -- + +Warning: Wrong parameter count for image_type_to_mime_type() 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_variation2.phpt b/ext/gd/tests/image_type_to_mime_type_variation2.phpt new file mode 100644 index 0000000000..141bc576ff --- /dev/null +++ b/ext/gd/tests/image_type_to_mime_type_variation2.phpt @@ -0,0 +1,80 @@ +--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=== -- 2.50.1