com php-src: Merge branch 'pull-request/742' into PHP-5.5: ext/gd/tests/imagepalettetotruecolor_basic.phpt ext/gd/te
sts/imagepalettetotruecolor_error1.phpt ext/gd/tests/im agepalettetotruecolor_error2.phpt ext/gd/tests/imagepal ettetotruecolor_error3.phpt

From: Date: Mon, 05 Jan 2015 03:47:54 +0000
Subject: com php-src: Merge branch 'pull-request/742' into PHP-5.5: ext/gd/tests/imagepalettetotruecolor_basic.phpt ext/gd/te
sts/imagepalettetotruecolor_error1.phpt ext/gd/tests/im agepalettetotruecolor_error2.phpt ext/gd/tests/imagepal ettetotruecolor_error3.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-83974@lists.php.net to get a copy of this message
Commit: 5639c3350e2d33b7e8f4b3c792f998aad08c293a Author: Stanislav Malyshev <stas@php.net> Sun, 4 Jan 2015 19:46:33 -0800 Parents: 75f93ed663ce9b7e1f8742b6840505884a143682 2659b0f3cb7e591d332de07ad5dc33751685dba8 Branches: PHP-5.5 PHP-5.6 master Link: http://git.php..net/?p=php-src.git;a=commitdiff;h=5639c3350e2d33b7e8f4b3c792f998aad08c293a Log: Merge branch 'pull-request/742' into PHP-5.5 * pull-request/742: Fixed typo GD: imagepalettetotruecolor tests Changed paths: AA ext/gd/tests/imagepalettetotruecolor_basic.phpt AA ext/gd/tests/imagepalettetotruecolor_error1.phpt AA ext/gd/tests/imagepalettetotruecolor_error2.phpt AA ext/gd/tests/imagepalettetotruecolor_error3.phpt Diff: diff --cc ext/gd/tests/imagepalettetotruecolor_basic.phpt index 0000000,0000000..63a2b51 new file mode 100644 --- /dev/null +++ b/ext/gd/tests/imagepalettetotruecolor_basic.phpt @@@ -1,0 -1,0 +1,22 @@@ ++--TEST-- ++does the imagepalettetotruecollor function realy converts the image palette? ++--CREDITS-- ++Carlos André Ferrari <caferrari [at] gmail [dot] com> ++--SKIPIF-- ++<?php ++ if (!extension_loaded('gd')) die("skip gd extension not available."); ++?> ++--FILE-- ++<?php ++$im = imagecreate(100, 100); ++var_dump(is_resource($im)); ++var_dump(imageistruecolor($im)); ++var_dump(imagepalettetotruecolor($im)); ++var_dump(imageistruecolor($im)); ++imagedestroy($im); ++?> ++--EXPECT-- ++bool(true) ++bool(false) ++bool(true) ++bool(true) diff --cc ext/gd/tests/imagepalettetotruecolor_error1.phpt index 0000000,0000000..3c994e5 new file mode 100644 --- /dev/null +++ b/ext/gd/tests/imagepalettetotruecolor_error1.phpt @@@ -1,0 -1,0 +1,14 @@@ ++--TEST-- ++imagepalettetotruecollor must return an error if no resource is given ++--CREDITS-- ++Carlos André Ferrari <caferrari [at] gmail [dot] com> ++--SKIPIF-- ++<?php ++ if (!extension_loaded('gd')) die("skip gd extension not available."); ++?> ++--FILE-- ++<?php ++imagepalettetotruecolor(); ++?> ++--EXPECTF-- ++Warning: imagepalettetotruecolor() expects exactly 1 parameter, 0 given in %s on line %d diff --cc ext/gd/tests/imagepalettetotruecolor_error2.phpt index 0000000,0000000..7a9a9ce new file mode 100644 --- /dev/null +++ b/ext/gd/tests/imagepalettetotruecolor_error2.phpt @@@ -1,0 -1,0 +1,14 @@@ ++--TEST-- ++imagepalettetotruecollor must return an error if not a resource is given ++--CREDITS-- ++Carlos André Ferrari <caferrari [at] gmail [dot] com> ++--SKIPIF-- ++<?php ++ if (!extension_loaded('gd')) die("skip gd extension not available."); ++?> ++--FILE-- ++<?php ++imagepalettetotruecolor("bla"); ++?> ++--EXPECTF-- ++Warning: imagepalettetotruecolor() expects parameter 1 to be resource, string given in %s on line %d diff --cc ext/gd/tests/imagepalettetotruecolor_error3.phpt index 0000000,0000000..42a7e71 new file mode 100644 --- /dev/null +++ b/ext/gd/tests/imagepalettetotruecolor_error3.phpt @@@ -1,0 -1,0 +1,15 @@@ ++--TEST-- ++imagepalettetotruecollor must return an error if not an image resource is given ++--CREDITS-- ++Carlos André Ferrari <caferrari [at] gmail [dot] com> ++--SKIPIF-- ++<?php ++ if (!extension_loaded('gd')) die("skip gd extension not available."); ++?> ++--FILE-- ++<?php ++$im = fopen('php://memory', 'w'); ++imagepalettetotruecolor($im); ++?> ++--EXPECTF-- ++Warning: imagepalettetotruecolor(): supplied resource is not a valid Image resource in %s on line %d

« previous php.cvs (#83974) next »