cvs: php-src /ext/gd/tests 001.phpt
| From: | Antony Dovgal | Date: | Tue, 10 Oct 2006 22:38:00 +0000 |
| Subject: | cvs: php-src /ext/gd/tests 001.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-41048@lists.php.net to get a copy of this message | ||
tony2001 Tue Oct 10 22:38:00 2006 UTC
Modified files:
/php-src/ext/gd/tests 001.phpt
Log:
add new test
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/001.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/gd/tests/001.phpt
diff -u /dev/null php-src/ext/gd/tests/001.phpt:1.2
--- /dev/null Tue Oct 10 22:38:00 2006
+++ php-src/ext/gd/tests/001.phpt Tue Oct 10 22:38:00 2006
@@ -0,0 +1,25 @@
+--TEST--
+imagecreatefrompng() and empty/missing file
+--SKIPIF--
+<?php if (!function_exists("imagecreatefrompng")) print "skip"; ?>
+--FILE--
+<?php
+
+$file = dirname(__FILE__)."/001.test";
+@unlink($file);
+
+var_dump(imagecreatefrompng($file));
+touch($file);
+var_dump(imagecreatefrompng($file));
+
+@unlink($file);
+
+echo "Done\n";
+?>
+--EXPECTF--
+Warning: imagecreatefrompng(%s001.test): failed to open stream: No such file or directory in %s on
line %d
+bool(false)
+
+Warning: imagecreatefrompng(): '%s001.test' is not a valid PNG file in %s on line %d
+bool(false)
+Done