mirror of
https://github.com/php/php-src.git
synced 2025-08-20 01:14:28 +02:00
MFH: Add test for imagecolorclosesthwb()
This commit is contained in:
parent
4f6ad789c7
commit
2d2f6a57f1
1 changed files with 27 additions and 0 deletions
27
ext/gd/tests/imagecolorclosesthwb.phpt
Normal file
27
ext/gd/tests/imagecolorclosesthwb.phpt
Normal file
|
@ -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+
|
Loading…
Add table
Add a link
Reference in a new issue