Annotation of embedaddon/php/ext/gd/tests/imagecolorallocatealpha_error2.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Testing imagecolorallocatealpha(): Wrong types for parameter 2
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, 'string-non-numeric', 255, 255, 50);
14: imagecolorallocatealpha($img, array(), 255, 255, 50);
15: imagecolorallocatealpha($img, tmpfile(), 255, 255, 50);
16: ?>
17: --EXPECTF--
18: Warning: imagecolorallocatealpha() expects parameter 2 to be long, %s given in %s on line %d
19:
20: Warning: imagecolorallocatealpha() expects parameter 2 to be long, array given in %s on line %d
21:
22: Warning: imagecolorallocatealpha() expects parameter 2 to be long, resource given in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>