--- /dev/null
+--TEST--
+Testing imagecolorallocatealpha()
+--CREDITS--
+Rafael Dohms <rdohms [at] gmail [dot] com>
+--SKIPIF--
+<?php
+ if (!extension_loaded("gd")) die("skip GD not present");
+?>
+--FILE--
+<?php
+$img = imagecreatetruecolor(150, 150);
+
+$cor = imagecolorallocate($img, 50, 100, 255);
+$corA = imagecolorallocatealpha($img, 50, 100, 255, 50);
+//$whiteA = imagecolorallocatealpha($img, 255, 255, 255, 127);
+
+$half = imagefilledarc ( $img, 75, 75, 70, 70, 0, 180, $cor, IMG_ARC_PIE );
+$half2 = imagefilledarc ( $img, 75, 75, 70, 70, 180, 360, $corA, IMG_ARC_PIE );
+
+ob_start();
+imagepng($img, null, 9);
+$imgsrc = ob_get_contents();
+ob_end_clean();
+
+var_dump(md5(base64_encode($imgsrc)));
+var_dump($corA);
+?>
+--EXPECT--
+string(32) "b856a0b1a15efe0f79551ebbb5651fe8"
+int(842163455)
\ No newline at end of file
--- /dev/null
+--TEST--
+Testing imagecolorallocatealpha(): Wrong types for parameter 1
+--CREDITS--
+Rafael Dohms <rdohms [at] gmail [dot] com>
+--SKIPIF--
+<?php
+ if (!extension_loaded("gd")) die("skip GD not present");
+?>
+--FILE--
+<?php
+$resource = tmpfile();
+
+imagecolorallocatealpha($resource, 255, 255, 255, 50);
+imagecolorallocatealpha('string', 255, 255, 255, 50);
+imagecolorallocatealpha(array(), 255, 255, 255, 50);
+imagecolorallocatealpha(null, 255, 255, 255, 50);
+?>
+--EXPECTF--
+Warning: imagecolorallocatealpha(): supplied resource is not a valid Image resource in %s on line %d
+
+Warning: imagecolorallocatealpha(): supplied argument is not a valid Image resource in %s on line %d
+
+Warning: imagecolorallocatealpha(): supplied argument is not a valid Image resource in %s on line %d
+
+Warning: imagecolorallocatealpha(): supplied argument is not a valid Image resource in %s on line %d
\ No newline at end of file
--- /dev/null
+--TEST--
+Testing imagecolorallocatealpha(): Wrong types for parameter 2
+--CREDITS--
+Rafael Dohms <rdohms [at] gmail [dot] com>
+--SKIPIF--
+<?php
+ if (!extension_loaded("gd")) die("skip GD not present");
+?>
+--FILE--
+<?php
+$img = imagecreatetruecolor(200, 200);
+
+imagecolorallocatealpha($img, 'string-non-numeric', 255, 255, 50);
+imagecolorallocatealpha($img, array(), 255, 255, 50);
+imagecolorallocatealpha($img, tmpfile(), 255, 255, 50);
+?>
+--EXPECTF--
+Warning: imagecolorallocatealpha() expects parameter 2 to be long, %s given in %s on line %d
+
+Warning: imagecolorallocatealpha() expects parameter 2 to be long, array given in %s on line %d
+
+Warning: imagecolorallocatealpha() expects parameter 2 to be long, resource given in %s on line %d
\ No newline at end of file
--- /dev/null
+--TEST--
+Testing imagecolorallocatealpha(): Wrong types for parameter 3
+--CREDITS--
+Rafael Dohms <rdohms [at] gmail [dot] com>
+--SKIPIF--
+<?php
+ if (!extension_loaded("gd")) die("skip GD not present");
+?>
+--FILE--
+<?php
+$img = imagecreatetruecolor(200, 200);
+
+imagecolorallocatealpha($img, 255, 'string-non-numeric', 255, 50);
+imagecolorallocatealpha($img, 255, array(), 255, 50);
+imagecolorallocatealpha($img, 255, tmpfile(), 255, 50);
+?>
+--EXPECTF--
+Warning: imagecolorallocatealpha() expects parameter 3 to be long, %s given in %s on line %d
+
+Warning: imagecolorallocatealpha() expects parameter 3 to be long, array given in %s on line %d
+
+Warning: imagecolorallocatealpha() expects parameter 3 to be long, resource given in %s on line %d
\ No newline at end of file
--- /dev/null
+--TEST--
+Testing imagecolorallocatealpha(): Wrong types for parameter 4
+--CREDITS--
+Rafael Dohms <rdohms [at] gmail [dot] com>
+--SKIPIF--
+<?php
+ if (!extension_loaded("gd")) die("skip GD not present");
+?>
+--FILE--
+<?php
+$img = imagecreatetruecolor(200, 200);
+
+imagecolorallocatealpha($img, 255, 255, 'string-non-numeric', 50);
+imagecolorallocatealpha($img, 255, 255, array(), 50);
+imagecolorallocatealpha($img, 255, 255, tmpfile(), 50);
+?>
+--EXPECTF--
+Warning: imagecolorallocatealpha() expects parameter 4 to be long, %s given in %s on line %d
+
+Warning: imagecolorallocatealpha() expects parameter 4 to be long, array given in %s on line %d
+
+Warning: imagecolorallocatealpha() expects parameter 4 to be long, resource given in %s on line %d
\ No newline at end of file
--- /dev/null
+--TEST--
+Testing imagecolorallocatealpha(): Wrong types for parameter 5
+--CREDITS--
+Rafael Dohms <rdohms [at] gmail [dot] com>
+--SKIPIF--
+<?php
+ if (!extension_loaded("gd")) die("skip GD not present");
+?>
+--FILE--
+<?php
+$img = imagecreatetruecolor(200, 200);
+
+imagecolorallocatealpha($img, 255, 255, 255, 'string-non-numeric');
+imagecolorallocatealpha($img, 255, 255, 255, array());
+imagecolorallocatealpha($img, 255, 255, 255, tmpfile());
+?>
+--EXPECTF--
+Warning: imagecolorallocatealpha() expects parameter 5 to be long, %s given in %s on line %d
+
+Warning: imagecolorallocatealpha() expects parameter 5 to be long, array given in %s on line %d
+
+Warning: imagecolorallocatealpha() expects parameter 5 to be long, resource given in %s on line %d
\ No newline at end of file