1--TEST--
2Test ImagickPixel, setColor
3--SKIPIF--
4<?php
5require_once(dirname(__FILE__) . '/skipif.inc');
6checkClassMethods('ImagickPixel', array('setColorFromPixel'));
7?>
8--FILE--
9<?php
10
11
12$backgroundColor = new \ImagickPixel('green');
13
14$red = new \ImagickPixel('red');
15
16$backgroundColor->setColorFromPixel($red);
17
18$expected = array(
19  "r" => 255,
20  "g" => 0,
21  "b" => 0,
22  "a" => 1
23);
24
25$actualColor = $backgroundColor->getColor();
26
27if ($actualColor != $expected) {
28	echo "Not as expected :\n";
29	var_dump($actualColor);
30}
31
32
33echo "Ok";
34?>
35--EXPECTF--
36Ok