summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2016-09-15 00:50:49 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2016-09-15 00:50:49 +0200
commitcf9e2fbbf6a215cd644d299ee392e77690a1b154 (patch)
tree70e294cba2c679dd817143ce33769e73e54cc509
parentb424d9f270fe0fac9f217b352355eede41976239 (diff)
parent7bfb7b62b1fa2a8a21c3718111424c80b91f6505 (diff)
downloadphp-git-cf9e2fbbf6a215cd644d299ee392e77690a1b154.tar.gz
Merge branch 'PHP-5.6' into PHP-7.0
-rw-r--r--ext/gd/tests/bug50194.phpt12
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/gd/tests/bug50194.phpt b/ext/gd/tests/bug50194.phpt
index 4b41a3a702..f68165be42 100644
--- a/ext/gd/tests/bug50194.phpt
+++ b/ext/gd/tests/bug50194.phpt
@@ -4,7 +4,7 @@ Bug #50194 (imagettftext broken on transparent background w/o alphablending)
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
if (!function_exists('imagettftext')) die('skip imagettftext() not available');
-die('skip freetype issues');
+//die('skip freetype issues');
?>
--FILE--
<?php
@@ -20,11 +20,19 @@ $font = __DIR__ . DIRECTORY_SEPARATOR . 'Tuffy.ttf';
imagettftext($im, 40, 0, 10, 40, $black, $font, $text);
imagesavealpha($im, true);
+ob_start();
test_image_equals_file(__DIR__ . DIRECTORY_SEPARATOR . 'bug50194.png', $im);
+$output = ob_get_clean();
+assert(preg_match('/The images are equal|The images differ in (\d+) pixels/', $output, $matches));
+if (isset($matches[1]) && $matches[1] > 2000) {
+ echo "The images differ in {$matches[1]} pixels.\n";
+} else {
+ echo "The images are similar.\n";
+}
imagedestroy($im);
?>
===DONE===
--EXPECT--
-The images are equal.
+The images are similar.
===DONE===