1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 02:33:17 +02:00
Files
archived-php-src/ext/gd/tests/imagefilledpolygon_negative.phpt
T
2019-09-10 12:37:42 +02:00

22 lines
476 B
PHP

--TEST--
imagefilledpolygon() with a negative num of points
--SKIPIF--
<?php
if (!function_exists('imagefilledpolygon')) die('skip imagefilledpolygon() not available');
?>
--FILE--
<?php
require __DIR__ . '/func.inc';
$im = imagecreate(100, 100);
$black = imagecolorallocate($im, 0, 0, 0);
trycatch_dump(
fn() => imagefilledpolygon($im, array(0, 0, 0, 0, 0, 0), -1, $black)
);
imagedestroy($im);
?>
--EXPECT--
!! [ValueError] You must give a positive number of points