1--TEST-- 2Test Imagick, statisticImage 3--SKIPIF-- 4<?php require_once(dirname(__FILE__) . '/skipif.inc'); 5 6checkClassMethods('Imagick', array('statisticImage')); 7 8?> 9--FILE-- 10<?php 11 12$statisticType = 1; 13$w20 = 5; 14$h20 = 5; 15$channel = Imagick::CHANNEL_DEFAULT; 16 17function statisticImage($statisticType, $w20, $h20, $channel) { 18 $imagick = new \Imagick(); 19 $imagick->newPseudoImage(640, 480, "magick:logo"); 20 21 $imagick->statisticImage( 22 $statisticType, 23 $w20, 24 $h20, 25 $channel 26 ); 27 28 $bytes = $imagick->getImageBlob(); 29 if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 30} 31 32statisticImage($statisticType, $w20, $h20, $channel) ; 33echo "Ok"; 34?> 35--EXPECTF-- 36Ok