Annotation of embedaddon/php/ext/gd/tests/imagecolorallocatealpha_error5.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Testing imagecolorallocatealpha(): Wrong types for parameter 5
! 3: --CREDITS--
! 4: Rafael Dohms <rdohms [at] gmail [dot] com>
! 5: --SKIPIF--
! 6: <?php
! 7: if (!extension_loaded("gd")) die("skip GD not present");
! 8: ?>
! 9: --FILE--
! 10: <?php
! 11: $img = imagecreatetruecolor(200, 200);
! 12:
! 13: imagecolorallocatealpha($img, 255, 255, 255, 'string-non-numeric');
! 14: imagecolorallocatealpha($img, 255, 255, 255, array());
! 15: imagecolorallocatealpha($img, 255, 255, 255, tmpfile());
! 16: ?>
! 17: --EXPECTF--
! 18: Warning: imagecolorallocatealpha() expects parameter 5 to be long, %s given in %s on line %d
! 19:
! 20: Warning: imagecolorallocatealpha() expects parameter 5 to be long, array given in %s on line %d
! 21:
! 22: Warning: imagecolorallocatealpha() expects parameter 5 to be long, resource given in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>