1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 17:22:15 +01:00
Files
archived-php-src/ext/gd/tests/imagecreate_error.phpt
Nikita Popov c5401854fc Run tidy
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +02:00

22 lines
524 B
PHP

--TEST--
Testing imagecreate(): error on out of bound parameters
--SKIPIF--
<?php
if (!extension_loaded("gd")) die("skip GD not present");
if (!function_exists("imagecreate")) die("skip GD Version not compatible");
?>
--FILE--
<?php
require __DIR__ . '/func.inc';
trycatch_dump(
fn() => imagecreate(-1, 30),
fn() => imagecreate(30, -1)
);
?>
--EXPECT--
!! [ValueError] imagecreate(): Argument #1 ($x_size) must be greater than 0
!! [ValueError] imagecreate(): Argument #2 ($y_size) must be greater than 0