From: Robert Nicholson Date: Fri, 1 Feb 2008 16:32:37 +0000 (+0000) Subject: - a few more gd tests (committed on behalf of andy wharmby) X-Git-Tag: RELEASE_2_0_0a1~668 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6da9b239aa73c2c44130ba55f19c7a283a1de89d;p=php - a few more gd tests (committed on behalf of andy wharmby) --- diff --git a/ext/gd/tests/gd_info_basic.phpt b/ext/gd/tests/gd_info_basic.phpt new file mode 100644 index 0000000000..61a2304e8f --- /dev/null +++ b/ext/gd/tests/gd_info_basic.phpt @@ -0,0 +1,29 @@ +--TEST-- +gd_info() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +basic test of gd_info() function +array(%d) { +%a +} + +Done diff --git a/ext/gd/tests/image_type_to_mime_type_basic.phpt b/ext/gd/tests/image_type_to_mime_type_basic.phpt new file mode 100644 index 0000000000..d6c654d22a --- /dev/null +++ b/ext/gd/tests/image_type_to_mime_type_basic.phpt @@ -0,0 +1,85 @@ +--TEST-- +image_type_to_mime_type() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +Starting image_type_to_mime_type() test + +string(9) "image/gif" +string(10) "image/jpeg" +string(9) "image/png" +string(29) "application/x-shockwave-flash" +string(9) "image/psd" +string(9) "image/bmp" +string(10) "image/tiff" +string(10) "image/tiff" +string(24) "application/octet-stream" +string(9) "image/jp2" +string(24) "application/octet-stream" +string(24) "application/octet-stream" +string(9) "image/iff" +string(18) "image/vnd.wap.wbmp" +string(24) "application/octet-stream" +string(9) "image/xbm" + +Done image_type_to_mime_type() test +--UEXPECT-- +Starting image_type_to_mime_type() test + +unicode(9) "image/gif" +unicode(10) "image/jpeg" +unicode(9) "image/png" +unicode(29) "application/x-shockwave-flash" +unicode(9) "image/psd" +unicode(9) "image/bmp" +unicode(10) "image/tiff" +unicode(10) "image/tiff" +unicode(24) "application/octet-stream" +unicode(9) "image/jp2" +unicode(24) "application/octet-stream" +unicode(24) "application/octet-stream" +unicode(9) "image/iff" +unicode(18) "image/vnd.wap.wbmp" +unicode(24) "application/octet-stream" +unicode(9) "image/xbm" + +Done image_type_to_mime_type() test \ No newline at end of file diff --git a/ext/gd/tests/imagecopyresampled_basic.phpt b/ext/gd/tests/imagecopyresampled_basic.phpt new file mode 100644 index 0000000000..12ac155119 --- /dev/null +++ b/ext/gd/tests/imagecopyresampled_basic.phpt @@ -0,0 +1,71 @@ +--TEST-- +imagecopyresampled() +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECT-- +Simple test of imagecopyresampled() function +Size of orginal: width=400 height=300 +Size of copy: width=200 height=150 +Done diff --git a/ext/gd/tests/imagedashedline_basic.phpt b/ext/gd/tests/imagedashedline_basic.phpt new file mode 100644 index 0000000000..afa602987d --- /dev/null +++ b/ext/gd/tests/imagedashedline_basic.phpt @@ -0,0 +1,101 @@ +--TEST-- +imagedashedline() +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECT-- +Simple test of imagedashedline() function +array(4) { + ["red"]=> + int(255) + ["green"]=> + int(0) + ["blue"]=> + int(0) + ["alpha"]=> + int(0) +} +array(4) { + ["red"]=> + int(0) + ["green"]=> + int(0) + ["blue"]=> + int(0) + ["alpha"]=> + int(0) +} +Done +--UEXPECT-- +Simple test of imagedashedline() function +array(4) { + [u"red"]=> + int(255) + [u"green"]=> + int(0) + [u"blue"]=> + int(0) + [u"alpha"]=> + int(0) +} +array(4) { + [u"red"]=> + int(0) + [u"green"]=> + int(0) + [u"blue"]=> + int(0) + [u"alpha"]=> + int(0) +} +Done \ No newline at end of file diff --git a/ext/gd/tests/imagefilledpolygon_basic.phpt b/ext/gd/tests/imagefilledpolygon_basic.phpt new file mode 100644 index 0000000000..b12119b6dd --- /dev/null +++ b/ext/gd/tests/imagefilledpolygon_basic.phpt @@ -0,0 +1,135 @@ +--TEST-- +imagefilledpolygon() +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECT-- +Simple test of imagefilledpolygon() function +array(4) { + ["red"]=> + int(0) + ["green"]=> + int(255) + ["blue"]=> + int(0) + ["alpha"]=> + int(0) +} +array(4) { + ["red"]=> + int(0) + ["green"]=> + int(255) + ["blue"]=> + int(0) + ["alpha"]=> + int(0) +} +array(4) { + ["red"]=> + int(0) + ["green"]=> + int(0) + ["blue"]=> + int(0) + ["alpha"]=> + int(0) +} +Done +--UEXPECT-- +Simple test of imagefilledpolygon() function +array(4) { + [u"red"]=> + int(0) + [u"green"]=> + int(255) + [u"blue"]=> + int(0) + [u"alpha"]=> + int(0) +} +array(4) { + [u"red"]=> + int(0) + [u"green"]=> + int(255) + [u"blue"]=> + int(0) + [u"alpha"]=> + int(0) +} +array(4) { + [u"red"]=> + int(0) + [u"green"]=> + int(0) + [u"blue"]=> + int(0) + [u"alpha"]=> + int(0) +} +Done diff --git a/ext/gd/tests/imagepolygon_basic.phpt b/ext/gd/tests/imagepolygon_basic.phpt new file mode 100644 index 0000000000..9197e07e4e --- /dev/null +++ b/ext/gd/tests/imagepolygon_basic.phpt @@ -0,0 +1,103 @@ +--TEST-- +imageploygon() +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECT-- +Simple test of imagepolygon() function +array(4) { + ["red"]=> + int(255) + ["green"]=> + int(0) + ["blue"]=> + int(0) + ["alpha"]=> + int(0) +} +array(4) { + ["red"]=> + int(0) + ["green"]=> + int(0) + ["blue"]=> + int(0) + ["alpha"]=> + int(0) +} +Done +--UEXPECT-- +Simple test of imagepolygon() function +array(4) { + [u"red"]=> + int(255) + [u"green"]=> + int(0) + [u"blue"]=> + int(0) + [u"alpha"]=> + int(0) +} +array(4) { + [u"red"]=> + int(0) + [u"green"]=> + int(0) + [u"blue"]=> + int(0) + [u"alpha"]=> + int(0) +} +Done