From: Rafael Machado Dohms Date: Fri, 24 Jul 2009 03:06:05 +0000 (+0000) Subject: Adding tests for imagesetthickness, basic and errors for both params, and complementi... X-Git-Tag: php-5.2.11RC1~114 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=918889c957e7fef2778f65dc37c6d871c1995c70;p=php Adding tests for imagesetthickness, basic and errors for both params, and complementing imagetruecolortopalette with out of bound params --- diff --git a/ext/gd/tests/imagesetthickness_basic.phpt b/ext/gd/tests/imagesetthickness_basic.phpt new file mode 100644 index 0000000000..a8b079bede --- /dev/null +++ b/ext/gd/tests/imagesetthickness_basic.phpt @@ -0,0 +1,34 @@ +--TEST-- +Testing imagetruecolortopalette() of GD library +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECT-- +93c3077f1bdc372cd0b0db96db282985 \ No newline at end of file diff --git a/ext/gd/tests/imagesetthickness_error1.phpt b/ext/gd/tests/imagesetthickness_error1.phpt new file mode 100644 index 0000000000..33b5bfac0b --- /dev/null +++ b/ext/gd/tests/imagesetthickness_error1.phpt @@ -0,0 +1,22 @@ +--TEST-- +Testing imagetruecolortopalette(): wrong types for first parameter +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: imagesetthickness(): supplied argument is not a valid Image resource in %s on line %d + +Warning: imagesetthickness(): supplied argument is not a valid Image resource in %s on line %d + +Warning: imagesetthickness(): supplied resource is not a valid Image resource in %s on line %d \ No newline at end of file diff --git a/ext/gd/tests/imagesetthickness_error2.phpt b/ext/gd/tests/imagesetthickness_error2.phpt new file mode 100644 index 0000000000..a83a4d80fe --- /dev/null +++ b/ext/gd/tests/imagesetthickness_error2.phpt @@ -0,0 +1,24 @@ +--TEST-- +Testing imagetruecolortopalette(): wrong types for second parameter +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +bool(true) +bool(true) +bool(true) \ No newline at end of file diff --git a/ext/gd/tests/imagetruecolortopalette_error4.phpt b/ext/gd/tests/imagetruecolortopalette_error4.phpt new file mode 100644 index 0000000000..b9661e3b85 --- /dev/null +++ b/ext/gd/tests/imagetruecolortopalette_error4.phpt @@ -0,0 +1,21 @@ +--TEST-- +Testing imagetruecolortopalette(): out of range parameter 3 +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: imagetruecolortopalette(): Number of colors has to be greater than zero in %s on line %d + +Warning: imagetruecolortopalette(): Number of colors has to be greater than zero in %s on line %d \ No newline at end of file