php-src/ext/gd/tests/imagefilledellipse_basic.phpt
Michael Orlitzky 0b8466f268 ext/gd/tests: add SKIPIF stanzas for missing PNG support
The bundled libgd always has PNG support, but an external one may not.
2023-12-31 17:11:25 +00:00

26 lines
520 B
PHP

--TEST--
Testing imagefilledellipse() of GD library
--EXTENSIONS--
gd
--SKIPIF--
<?php
if (!(imagetypes() & IMG_PNG)) {
die("skip No PNG support");
}
?>
--FILE--
<?php
$image = imagecreatetruecolor(100, 100);
$white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
//create an ellipse and fill it with white color
imagefilledellipse($image, 50, 50, 40, 30, $white);
include_once __DIR__ . '/func.inc';
test_image_equals_file(__DIR__ . '/imagefilledellipse_basic.png', $image);
?>
--EXPECT--
The images are equal.