summaryrefslogtreecommitdiff
path: root/ext/gd/tests/imagelayereffect_error3.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gd/tests/imagelayereffect_error3.phpt')
-rw-r--r--ext/gd/tests/imagelayereffect_error3.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/gd/tests/imagelayereffect_error3.phpt b/ext/gd/tests/imagelayereffect_error3.phpt
new file mode 100644
index 0000000..d4deff1
--- /dev/null
+++ b/ext/gd/tests/imagelayereffect_error3.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Testing imagelayereffect() with invalid resource 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");
+ if (!GD_BUNDLED) die('skip function only available in bundled, external GD detected');
+?>
+--FILE--
+<?php
+$resource = tmpfile();
+$layer = imagelayereffect($resource, IMG_EFFECT_REPLACE);
+?>
+--EXPECTF--
+Warning: imagelayereffect(): supplied resource is not a valid Image resource in %s on line %d