diff options
author | Kalle Sommer Nielsen <kalle@php.net> | 2008-07-30 04:35:57 +0000 |
---|---|---|
committer | Kalle Sommer Nielsen <kalle@php.net> | 2008-07-30 04:35:57 +0000 |
commit | 2d2f6a57f15ea3b660fd3270b40435949dfeb847 (patch) | |
tree | 7d821a8c9bc4c8932e12ffd4fbe8265499724123 /ext/gd | |
parent | 4f6ad789c7162d1c895a2c494c8bbba53db72654 (diff) | |
download | php-git-2d2f6a57f15ea3b660fd3270b40435949dfeb847.tar.gz |
MFH: Add test for imagecolorclosesthwb()
Diffstat (limited to 'ext/gd')
-rw-r--r-- | ext/gd/tests/imagecolorclosesthwb.phpt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ext/gd/tests/imagecolorclosesthwb.phpt b/ext/gd/tests/imagecolorclosesthwb.phpt new file mode 100644 index 0000000000..fe3927896e --- /dev/null +++ b/ext/gd/tests/imagecolorclosesthwb.phpt @@ -0,0 +1,27 @@ +--TEST-- +imagecolorclosesthwb() test +--SKIPIF-- +<?php + if(!extension_loaded('gd')){ die('skip: gd extension not available'); } + if(!function_exists('imagecolorclosesthwb')){ die('skip: imagecolorclosesthwb() not available'); } +?> +--FILE-- +<?php + $im = imagecreatefrompng('test.png'); + + echo imagecolorclosesthwb($im, 255, 50, 0); + + imagecolorclosesthwb(NULL); + imagecolorclosesthwb(NULL, NULL, NULL, NULL); + imagecolorclosesthwb($im, "hello", "from", "gd"); + + imagedestroy($im); +?> +--EXPECTF-- +16724480 + +Warning: imagecolorclosesthwb\(\) expects exactly 4 parameters, 1 given in .* code on line \d+ + +Warning: imagecolorclosesthwb\(\) expects parameter 1 to be resource, null given in .* code on line \d+ + +Warning: imagecolorclosesthwb\(\) expects parameter 2 to be long, string given in .* code on line \d+
\ No newline at end of file |