php-src/ext/gd/tests/imagestring_basic.phpt

26 lines
539 B
Plaintext
Raw Normal View History

2009-07-01 00:51:26 +00:00
--TEST--
Testing imagestring() of GD library
--CREDITS--
Rafael Dohms <rdohms [at] gmail [dot] com>
#testfest PHPSP on 2009-06-20
--SKIPIF--
<?php
if (!extension_loaded("gd")) die("skip GD not present");
?>
--FILE--
<?php
$image = imagecreatetruecolor(180, 30);
$white = imagecolorallocate($image, 255,255,255);
$result = imagestring($image, 1, 5, 5, 'String Text', $white);
ob_start();
imagepng($image, null, 9);
$img = ob_get_contents();
ob_end_clean();
echo md5(base64_encode($img));
?>
--EXPECT--
d0d2fe757400cb7846b36a8c34b41e4a