From 0410d213648f951de0496ec2f1cd107bcf0a6efe Mon Sep 17 00:00:00 2001 From: Rafael Machado Dohms Date: Mon, 24 Aug 2009 02:50:19 +0000 Subject: [PATCH] Adding tests for imagecolorallocatealpha --- .../tests/imagecolorallocatealpha_basic.phpt | 30 +++++++++++++++++++ .../tests/imagecolorallocatealpha_error1.phpt | 25 ++++++++++++++++ .../tests/imagecolorallocatealpha_error2.phpt | 22 ++++++++++++++ .../tests/imagecolorallocatealpha_error3.phpt | 22 ++++++++++++++ .../tests/imagecolorallocatealpha_error4.phpt | 22 ++++++++++++++ .../tests/imagecolorallocatealpha_error5.phpt | 22 ++++++++++++++ 6 files changed, 143 insertions(+) create mode 100644 ext/gd/tests/imagecolorallocatealpha_basic.phpt create mode 100644 ext/gd/tests/imagecolorallocatealpha_error1.phpt create mode 100644 ext/gd/tests/imagecolorallocatealpha_error2.phpt create mode 100644 ext/gd/tests/imagecolorallocatealpha_error3.phpt create mode 100644 ext/gd/tests/imagecolorallocatealpha_error4.phpt create mode 100644 ext/gd/tests/imagecolorallocatealpha_error5.phpt diff --git a/ext/gd/tests/imagecolorallocatealpha_basic.phpt b/ext/gd/tests/imagecolorallocatealpha_basic.phpt new file mode 100644 index 0000000000..acd347a270 --- /dev/null +++ b/ext/gd/tests/imagecolorallocatealpha_basic.phpt @@ -0,0 +1,30 @@ +--TEST-- +Testing imagecolorallocatealpha() +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECT-- +unicode(32) "b856a0b1a15efe0f79551ebbb5651fe8" +int(842163455) \ No newline at end of file diff --git a/ext/gd/tests/imagecolorallocatealpha_error1.phpt b/ext/gd/tests/imagecolorallocatealpha_error1.phpt new file mode 100644 index 0000000000..a9030248bb --- /dev/null +++ b/ext/gd/tests/imagecolorallocatealpha_error1.phpt @@ -0,0 +1,25 @@ +--TEST-- +Testing imagecolorallocatealpha(): Wrong types for parameter 1 +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: imagecolorallocatealpha(): supplied resource is not a valid Image resource in %s on line %d + +Warning: imagecolorallocatealpha() expects parameter 1 to be resource, %s given in %s on line %d + +Warning: imagecolorallocatealpha() expects parameter 1 to be resource, array given in %s on line %d + +Warning: imagecolorallocatealpha() 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/imagecolorallocatealpha_error2.phpt b/ext/gd/tests/imagecolorallocatealpha_error2.phpt new file mode 100644 index 0000000000..ba9e5de699 --- /dev/null +++ b/ext/gd/tests/imagecolorallocatealpha_error2.phpt @@ -0,0 +1,22 @@ +--TEST-- +Testing imagecolorallocatealpha(): Wrong types for parameter 2 +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: imagecolorallocatealpha() expects parameter 2 to be long, %s given in %s on line %d + +Warning: imagecolorallocatealpha() expects parameter 2 to be long, array given in %s on line %d + +Warning: imagecolorallocatealpha() expects parameter 2 to be long, resource given in %s on line %d \ No newline at end of file diff --git a/ext/gd/tests/imagecolorallocatealpha_error3.phpt b/ext/gd/tests/imagecolorallocatealpha_error3.phpt new file mode 100644 index 0000000000..ee8f646e78 --- /dev/null +++ b/ext/gd/tests/imagecolorallocatealpha_error3.phpt @@ -0,0 +1,22 @@ +--TEST-- +Testing imagecolorallocatealpha(): Wrong types for parameter 3 +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: imagecolorallocatealpha() expects parameter 3 to be long, %s given in %s on line %d + +Warning: imagecolorallocatealpha() expects parameter 3 to be long, array given in %s on line %d + +Warning: imagecolorallocatealpha() expects parameter 3 to be long, resource given in %s on line %d \ No newline at end of file diff --git a/ext/gd/tests/imagecolorallocatealpha_error4.phpt b/ext/gd/tests/imagecolorallocatealpha_error4.phpt new file mode 100644 index 0000000000..2b5b471890 --- /dev/null +++ b/ext/gd/tests/imagecolorallocatealpha_error4.phpt @@ -0,0 +1,22 @@ +--TEST-- +Testing imagecolorallocatealpha(): Wrong types for parameter 4 +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: imagecolorallocatealpha() expects parameter 4 to be long, %s given in %s on line %d + +Warning: imagecolorallocatealpha() expects parameter 4 to be long, array given in %s on line %d + +Warning: imagecolorallocatealpha() expects parameter 4 to be long, resource given in %s on line %d \ No newline at end of file diff --git a/ext/gd/tests/imagecolorallocatealpha_error5.phpt b/ext/gd/tests/imagecolorallocatealpha_error5.phpt new file mode 100644 index 0000000000..2d77833e9c --- /dev/null +++ b/ext/gd/tests/imagecolorallocatealpha_error5.phpt @@ -0,0 +1,22 @@ +--TEST-- +Testing imagecolorallocatealpha(): Wrong types for parameter 5 +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: imagecolorallocatealpha() expects parameter 5 to be long, %s given in %s on line %d + +Warning: imagecolorallocatealpha() expects parameter 5 to be long, array given in %s on line %d + +Warning: imagecolorallocatealpha() expects parameter 5 to be long, resource given in %s on line %d \ No newline at end of file -- 2.40.0