diff options
author | Felipe Pena <felipe@php.net> | 2009-07-01 00:56:01 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2009-07-01 00:56:01 +0000 |
commit | db6f5e67a8ce0c6a4a1e936942cd99a86cb8a59f (patch) | |
tree | 2126df891eeea7365dacf52b31d177038b3f2ff5 /ext/gd/tests/imagestringup_basic.phpt | |
parent | 2361b4ea2a640fe11c615fdeac6e8b27f86340a0 (diff) | |
download | php-git-db6f5e67a8ce0c6a4a1e936942cd99a86cb8a59f.tar.gz |
- MFH: New tests (SaoPaulo UG testfest)
Diffstat (limited to 'ext/gd/tests/imagestringup_basic.phpt')
-rw-r--r-- | ext/gd/tests/imagestringup_basic.phpt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ext/gd/tests/imagestringup_basic.phpt b/ext/gd/tests/imagestringup_basic.phpt new file mode 100644 index 0000000000..0c748b6aa9 --- /dev/null +++ b/ext/gd/tests/imagestringup_basic.phpt @@ -0,0 +1,25 @@ +--TEST-- +Testing imagestringup() 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 = imagestringup($image, 1, 5, 25, 'Str', $white); + +ob_start(); +imagepng($image, null, 9); +$img = ob_get_contents(); +ob_end_clean(); + +echo md5(base64_encode($img)); +?> +--EXPECT-- +7c28016adcf620b772af2a8655b87bd2 |