xref: /PHP-8.0/ext/gd/tests/colormatch.phpt (revision 14a26db3)
1--TEST--
2imagecolormatch
3--SKIPIF--
4<?php
5        if (!function_exists('imagecolormatch')) die("skip gd extension not available\n");
6?>
7--FILE--
8<?php
9
10$im = imagecreatetruecolor(5,5);
11$im2 = imagecreate(5,5);
12
13try {
14    imagecolormatch($im, $im2);
15} catch (ValueError $exception) {
16    echo $exception->getMessage() . "\n";
17}
18
19echo "ok\n";
20
21imagedestroy($im);
22?>
23--EXPECT--
24imagecolormatch(): Argument #2 ($image2) must have at least one color
25ok
26