mirror of
https://github.com/php/php-src.git
synced 2024-09-26 20:37:29 +00:00
fix tests
This commit is contained in:
parent
357c16c598
commit
2560c18bf6
@ -2,8 +2,7 @@
|
||||
Bug #44849 (imagecolorclosesthwb is not available on Windows)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded('gd')){ die('skip: gd extension not available'); }
|
||||
if(strtoupper(substr(PHP_OS, 0, 3)) != 'WIN'){ die('skip: not a Windows operating system'); }
|
||||
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
@ -7,21 +7,24 @@ imagecolorclosesthwb() test
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$im = imagecreatefrompng('test.png');
|
||||
$im = imagecreatefrompng(dirname(__FILE__).'/test.png');
|
||||
|
||||
echo imagecolorclosesthwb($im, 255, 50, 0);
|
||||
var_dump(imagecolorclosesthwb($im, 255, 50, 0));
|
||||
|
||||
imagecolorclosesthwb(NULL);
|
||||
imagecolorclosesthwb(NULL, NULL, NULL, NULL);
|
||||
imagecolorclosesthwb($im, "hello", "from", "gd");
|
||||
var_dump(imagecolorclosesthwb(NULL));
|
||||
var_dump(imagecolorclosesthwb(NULL, NULL, NULL, NULL));
|
||||
var_dump(imagecolorclosesthwb($im, "hello", "from", "gd"));
|
||||
|
||||
imagedestroy($im);
|
||||
?>
|
||||
--EXPECTF--
|
||||
16724480
|
||||
int(16724480)
|
||||
|
||||
Warning: imagecolorclosesthwb\(\) expects exactly 4 parameters, 1 given in .* code on line \d+
|
||||
Warning: imagecolorclosesthwb() expects exactly 4 parameters, 1 given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: imagecolorclosesthwb\(\) expects parameter 1 to be resource, null given in .* code on line \d+
|
||||
Warning: imagecolorclosesthwb() expects parameter 1 to be resource, null given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: imagecolorclosesthwb\(\) expects parameter 2 to be long, string given in .* code on line \d+
|
||||
Warning: imagecolorclosesthwb() expects parameter 2 to be long, string given in %s on line %d
|
||||
NULL
|
||||
|
Loading…
Reference in New Issue
Block a user