[PHP-CVS] cvs: php-src(PHP_5_3) /ext/gd/tests imagecolorclosesthwb.phpt

2008-07-30 Thread Antony Dovgal
tony2001Wed Jul 30 09:55:20 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/gd/tests   imagecolorclosesthwb.phpt 
  Log:
  fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorclosesthwb.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/gd/tests/imagecolorclosesthwb.phpt
diff -u php-src/ext/gd/tests/imagecolorclosesthwb.phpt:1.1.2.2 
php-src/ext/gd/tests/imagecolorclosesthwb.phpt:1.1.2.3
--- php-src/ext/gd/tests/imagecolorclosesthwb.phpt:1.1.2.2  Wed Jul 30 
04:35:57 2008
+++ php-src/ext/gd/tests/imagecolorclosesthwb.phpt  Wed Jul 30 09:55:20 2008
@@ -7,21 +7,24 @@
 ?
 --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



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/gd/tests imagecolorclosesthwb.phpt

2008-07-29 Thread Kalle Sommer Nielsen
kalle   Wed Jul 30 04:35:57 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/gd/tests   imagecolorclosesthwb.phpt 
  Log:
  MFH: Add test for imagecolorclosesthwb()
  

http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorclosesthwb.phpt?view=markuprev=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+


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php