From: Rafael Machado Dohms Date: Mon, 20 Jul 2009 03:47:29 +0000 (+0000) Subject: Separating and complementing imageistruecolor and imagetruecolortopalette tests X-Git-Tag: php-5.4.0alpha1~191^2~3044 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc342035cafbce9398799aa6d28cbc4dc6141005;p=php Separating and complementing imageistruecolor and imagetruecolortopalette tests --- diff --git a/ext/gd/tests/imageistruecolor_basic.phpt b/ext/gd/tests/imageistruecolor_basic.phpt new file mode 100644 index 0000000000..a78aaa46ef --- /dev/null +++ b/ext/gd/tests/imageistruecolor_basic.phpt @@ -0,0 +1,17 @@ +--TEST-- +Testing imageistruecolor() of GD library +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true) \ No newline at end of file diff --git a/ext/gd/tests/imageistruecolor_error1.phpt b/ext/gd/tests/imageistruecolor_error1.phpt new file mode 100644 index 0000000000..b398041746 --- /dev/null +++ b/ext/gd/tests/imageistruecolor_error1.phpt @@ -0,0 +1,24 @@ +--TEST-- +Testing imageistruecolor(): wrong parameters +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: imageistruecolor() expects parameter 1 to be resource, Unicode string given in %s on line %d + +Warning: imageistruecolor(): supplied resource is not a valid Image resource in %s on line %d + +Warning: imageistruecolor() expects parameter 1 to be resource, array given in %s on line %d \ No newline at end of file diff --git a/ext/gd/tests/imagetruecolortopalette_basic.phpt b/ext/gd/tests/imagetruecolortopalette_basic.phpt new file mode 100644 index 0000000000..b0a0394b55 --- /dev/null +++ b/ext/gd/tests/imagetruecolortopalette_basic.phpt @@ -0,0 +1,31 @@ +--TEST-- +Testing imagetruecolortopalette() of GD library +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true) +0843f63ab2f9fddedd69b0b421686bc5 \ No newline at end of file diff --git a/ext/gd/tests/imagetruecolortopalette_error1.phpt b/ext/gd/tests/imagetruecolortopalette_error1.phpt new file mode 100644 index 0000000000..ecafa158b6 --- /dev/null +++ b/ext/gd/tests/imagetruecolortopalette_error1.phpt @@ -0,0 +1,26 @@ +--TEST-- +Testing imagetruecolortopalette(): wrong parameters for parameter 1 +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: imagetruecolortopalette(): supplied resource is not a valid Image resource in %s on line %d + +Warning: imagetruecolortopalette() expects parameter 1 to be resource, %s given in %s on line %d + +Warning: imagetruecolortopalette() expects parameter 1 to be resource, array given in %s on line %d + +Warning: imagetruecolortopalette() expects parameter 1 to be resource, null given in %s on line %d \ No newline at end of file diff --git a/ext/gd/tests/imagetruecolortopalette_error2.phpt b/ext/gd/tests/imagetruecolortopalette_error2.phpt new file mode 100644 index 0000000000..cb7004caa8 --- /dev/null +++ b/ext/gd/tests/imagetruecolortopalette_error2.phpt @@ -0,0 +1,22 @@ +--TEST-- +Testing imagetruecolortopalette(): wrong parameters for parameter 2 +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: imagetruecolortopalette() expects parameter 2 to be boolean, resource given in %s on line %d + +Warning: imagetruecolortopalette() expects parameter 2 to be boolean, array given in %s on line %d \ No newline at end of file diff --git a/ext/gd/tests/imagetruecolortopalette_error3.phpt b/ext/gd/tests/imagetruecolortopalette_error3.phpt new file mode 100644 index 0000000000..a07a43d012 --- /dev/null +++ b/ext/gd/tests/imagetruecolortopalette_error3.phpt @@ -0,0 +1,28 @@ +--TEST-- +Testing imagetruecolortopalette(): wrong parameters for parameter 3 +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: imagetruecolortopalette() expects parameter 3 to be long, Unicode string given in %s on line %d + +Warning: imagetruecolortopalette() expects parameter 3 to be long, resource given in %s on line %d + +Warning: imagetruecolortopalette() expects parameter 3 to be long, array given 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