cvs: php-src /ext/gd/tests imagecolorclosesthwb.phpt
| From: | Kalle Sommer Nielsen | Date: | Wed, 30 Jul 2008 04:35:22 +0000 |
| Subject: | cvs: php-src /ext/gd/tests imagecolorclosesthwb.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-51747@lists.php.net to get a copy of this message | ||
kalle Wed Jul 30 04:35:22 2008 UTC
Added files:
/php-src/ext/gd/tests imagecolorclosesthwb.phpt
Log:
Add test for imagecolorclosesthwb()
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorclosesthwb.phpt?view=markup&rev=1.1
Index: php-src/ext/gd/tests/imagecolorclosesthwb.phpt
+++ php-src/ext/gd/tests/imagecolorclosesthwb.phpt
--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+