Annotation of embedaddon/php/ext/gd/tests/imagetruecolortopalette_error3.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Testing imagetruecolortopalette(): wrong parameters for parameter 3
                      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: $image = imagecreatetruecolor(50, 50);
                     13: $resource = tmpfile();
                     14: 
                     15: imagetruecolortopalette($image, true, 'string');
                     16: imagetruecolortopalette($image, true, $resource);
                     17: imagetruecolortopalette($image, true, array());
                     18: imagetruecolortopalette($image, true, null);
                     19: 
                     20: ?>
                     21: --EXPECTF--
                     22: Warning: imagetruecolortopalette() expects parameter 3 to be long, string given in %s on line %d
                     23: 
                     24: Warning: imagetruecolortopalette() expects parameter 3 to be long, resource given in %s on line %d
                     25: 
                     26: Warning: imagetruecolortopalette() expects parameter 3 to be long, array given in %s on line %d
                     27: 
                     28: Warning: imagetruecolortopalette(): Number of colors has to be greater than zero in %s on line %d

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>