Current Path : /usr/opt/php72/share/pear/test/imagick/tests/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/opt/php72/share/pear/test/imagick/tests/269_ImagickPixel_setColorFromPixel_basic.phpt |
--TEST-- Test ImagickPixel, setColor --SKIPIF-- <?php require_once(dirname(__FILE__) . '/skipif.inc'); checkClassMethods('Imagick', array('setColorFromPixel')); ?> --FILE-- <?php $backgroundColor = new \ImagickPixel('green'); $red = new \ImagickPixel('red'); $backgroundColor->setColorFromPixel($red); $expected = array( "r" => 255, "g" => 0, "b" => 0, "a" => 1 ); $actualColor = $backgroundColor->getColor(); if ($actualColor != $expected) { echo "Not as expected :\n"; var_dump($actualColor); } echo "Ok"; ?> --EXPECTF-- Ok