php-src/ext/gd/tests/bug53154.phpt
Christoph M. Becker a375d54785
Migrate skip checks to --EXTENSIONS-- for ext/gd
Cf. PR #6787.

Closes GH-6994.
2021-05-22 15:38:51 +02:00

26 lines
582 B
PHP

--TEST--
Bug #53154 (Zero-height rectangle has whiskers)
--EXTENSIONS--
gd
--SKIPIF--
<?php
if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
die("skip test requires GD 2.2.2 or higher");
}
?>
--FILE--
<?php
$im = imagecreatetruecolor(100, 10);
$red = imagecolorallocate($im, 255, 0, 0);
imagerectangle($im, 5, 5, 95, 5, $red);
var_dump(imagecolorat($im, 5, 4) !== $red);
var_dump(imagecolorat($im, 5, 6) !== $red);
var_dump(imagecolorat($im, 95, 4) !== $red);
var_dump(imagecolorat($im, 95, 6) !== $red);
?>
--EXPECT--
bool(true)
bool(true)
bool(true)
bool(true)