summaryrefslogtreecommitdiff
path: root/ext/zlib/tests/gzpassthru_error.phpt
diff options
context:
space:
mode:
authorDave Kelsey <dkelsey@php.net>2009-01-19 14:03:08 (GMT)
committerDave Kelsey <dkelsey@php.net>2009-01-19 14:03:08 (GMT)
commit8f9ec4238fa879ab7bc4adb5c42a222b929c3b60 (patch)
treea5c6e17e512963f68d6933ceebca218b55a26487 /ext/zlib/tests/gzpassthru_error.phpt
parent357ed77aeaeaf45885d372b061b67110fe04dc76 (diff)
downloadphp-8f9ec4238fa879ab7bc4adb5c42a222b929c3b60.tar.gz
new tests for zlib extension, tested on windows, linux and linux64
Diffstat (limited to 'ext/zlib/tests/gzpassthru_error.phpt')
-rw-r--r--ext/zlib/tests/gzpassthru_error.phpt29
1 files changed, 29 insertions, 0 deletions
diff --git a/ext/zlib/tests/gzpassthru_error.phpt b/ext/zlib/tests/gzpassthru_error.phpt
new file mode 100644
index 0000000..18d72ef
--- /dev/null
+++ b/ext/zlib/tests/gzpassthru_error.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Test function gzpassthru() by calling it more than or less than its expected arguments
+--SKIPIF--
+<?php
+if (!extension_loaded("zlib")) {
+ print "skip - ZLIB extension not loaded";
+}
+?>
+--FILE--
+<?php
+
+
+$f = dirname(__FILE__)."/004.txt.gz";
+$h = gzopen($f, 'r');
+$extra_arg = 'nothing';
+var_dump(gzpassthru( $h, $extra_arg ) );
+var_dump(gzpassthru() );
+gzclose($h);
+
+?>
+===DONE===
+--EXPECTF--
+
+Warning: gzpassthru() expects exactly 1 parameter, 2 given in %s on line %d
+bool(false)
+
+Warning: gzpassthru() expects exactly 1 parameter, 0 given in %s on line %d
+bool(false)
+===DONE=== \ No newline at end of file