]> granicus.if.org Git - php/commitdiff
fix test
authorAntony Dovgal <tony2001@php.net>
Wed, 30 Jul 2008 09:55:20 +0000 (09:55 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 30 Jul 2008 09:55:20 +0000 (09:55 +0000)
ext/gd/tests/imagecolorclosesthwb.phpt

index fe3927896eb97c6a82bdef4e139e45b9d988a2ee..4266514a85dde001ccb915b89ac23040e9a84e1b 100644 (file)
@@ -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+
\ No newline at end of file
+Warning: imagecolorclosesthwb() expects parameter 2 to be long, string given in %s on line %d
+NULL