Annotation of embedaddon/php/ext/gd/tests/imagetruecolortopalette_error1.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Testing imagetruecolortopalette(): wrong parameters for parameter 1
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: if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
9: ?>
10: --FILE--
11: <?php
12: $resource = tmpfile();
13:
14: imagetruecolortopalette($resource, true, 2);
15: imagetruecolortopalette('string', true, 2);
16: imagetruecolortopalette(array(), true, 2);
17: imagetruecolortopalette(null, true, 2);
18: ?>
19: --EXPECTF--
20: Warning: imagetruecolortopalette(): supplied resource is not a valid Image resource in %s on line %d
21:
22: Warning: imagetruecolortopalette() expects parameter 1 to be resource, %s given in %s on line %d
23:
24: Warning: imagetruecolortopalette() expects parameter 1 to be resource, array given in %s on line %d
25:
26: Warning: imagetruecolortopalette() expects parameter 1 to be resource, null given in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>