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

1.1       misho       1: --TEST--
                      2: Testing imagecolorallocatealpha(): Wrong types 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: ?>
                      9: --FILE--
                     10: <?php
                     11: $resource = tmpfile();
                     12: 
                     13: imagecolorallocatealpha($resource, 255, 255, 255, 50);
                     14: imagecolorallocatealpha('string', 255, 255, 255, 50);
                     15: imagecolorallocatealpha(array(), 255, 255, 255, 50);
                     16: imagecolorallocatealpha(null, 255, 255, 255, 50);
                     17: ?>
                     18: --EXPECTF--
                     19: Warning: imagecolorallocatealpha(): supplied resource is not a valid Image resource in %s on line %d
                     20: 
                     21: Warning: imagecolorallocatealpha() expects parameter 1 to be resource, %s given in %s on line %d
                     22: 
                     23: Warning: imagecolorallocatealpha() expects parameter 1 to be resource, array given in %s on line %d
                     24: 
                     25: Warning: imagecolorallocatealpha() expects parameter 1 to be resource, null given in %s on line %d

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