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