diff options
Diffstat (limited to 'ext/gd/tests/imagefilledpolygon_negative.phpt')
-rw-r--r-- | ext/gd/tests/imagefilledpolygon_negative.phpt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/gd/tests/imagefilledpolygon_negative.phpt b/ext/gd/tests/imagefilledpolygon_negative.phpt new file mode 100644 index 0000000..ced8530 --- /dev/null +++ b/ext/gd/tests/imagefilledpolygon_negative.phpt @@ -0,0 +1,15 @@ +--TEST-- +imagefilledpolygon() with a negative num of points +--SKIPIF-- +<?php + if (!function_exists('imagefilledpolygon')) die('skip imagefilledpolygon() not available'); +?> +--FILE-- +<?php +$im = imagecreate(100, 100); +$black = imagecolorallocate($im, 0, 0, 0); +if (imagefilledpolygon($im, array(0, 0, 0, 0, 0, 0), -1, $black)) echo "should be false"; +imagedestroy($im); +?> +--EXPECTF-- +Warning: imagefilledpolygon(): You must give a positive number of points in %s on line %d |