summaryrefslogtreecommitdiff
path: root/ext/gd/tests/colormatch.phpt
blob: 7ddf2c87a184adffe6a8e1ad85972b2bf873c871 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
imagecolormatch
--SKIPIF--
<?php
        if (!function_exists('imagecolormatch')) die("skip gd extension not available\n");
?>
--FILE--
<?php

$im = imagecreatetruecolor(5,5);
$im2 = imagecreate(5,5);

try {
    imagecolormatch($im, $im2);
} catch (ValueError $exception) {
    echo $exception->getMessage() . "\n";
}

echo "ok\n";

imagedestroy($im);
?>
--EXPECT--
imagecolormatch(): Argument #2 ($image2) must have at least one color
ok