summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2005-12-26 17:15:51 +0000
committerPierre Joye <pajoye@php.net>2005-12-26 17:15:51 +0000
commit7074d0c2bfa9860f050365edb73812719bbc312c (patch)
treece28e3b09693dfabdf4f475d924036f9fc58de36 /ext
parentfbe210b8b53e927a3aaaafa7bfd85ab895f915b0 (diff)
downloadphp-git-7074d0c2bfa9860f050365edb73812719bbc312c.tar.gz
- imagetypes test
- copyresized title
Diffstat (limited to 'ext')
-rw-r--r--ext/gd/tests/copyresized.phpt4
-rw-r--r--ext/gd/tests/types.phpt33
2 files changed, 35 insertions, 2 deletions
diff --git a/ext/gd/tests/copyresized.phpt b/ext/gd/tests/copyresized.phpt
index 85eabd8664..fe98642dbb 100644
--- a/ext/gd/tests/copyresized.phpt
+++ b/ext/gd/tests/copyresized.phpt
@@ -1,8 +1,8 @@
--TEST--
-imagecopy
+imagecopyresized
--SKIPIF--
<?php
- if (!function_exists('imagecopy')) die("skip gd extension not available\n");
+ if (!function_exists('imagecopyresized')) die("skip gd extension not available\n");
?>
--FILE--
<?php
diff --git a/ext/gd/tests/types.phpt b/ext/gd/tests/types.phpt
new file mode 100644
index 0000000000..0b79e78d1b
--- /dev/null
+++ b/ext/gd/tests/types.phpt
@@ -0,0 +1,33 @@
+--TEST--
+imagetypes
+--SKIPIF--
+<?php
+ if (!function_exists('imagetypes')) die("skip gd extension not available\n");
+?>
+--FILE--
+<?php
+$flags = imagetypes();
+
+if ($flags&0x1 && !function_exists("imagegif")) {
+ echo "gif failed\n";
+}
+
+if ($flags&0x2 && !function_exists("imagejpeg")) {
+ echo "jpeg failed\n";
+}
+
+if ($flags&0x4 && !function_exists("imagepng")) {
+ echo "png failed\n";
+}
+
+if ($flags&0x8 && !function_exists("imagewbmp")) {
+ echo "wbmp failed\n";
+}
+
+if ($flags&16 && !function_exists("imagecreatefromxpm")) {
+ echo "xom failed\n";
+}
+echo "ok\n";
+?>
+--EXPECTF--
+ok