diff options
Diffstat (limited to 'ext/zlib/tests/gzgetc_error.phpt')
-rw-r--r-- | ext/zlib/tests/gzgetc_error.phpt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ext/zlib/tests/gzgetc_error.phpt b/ext/zlib/tests/gzgetc_error.phpt new file mode 100644 index 0000000..cbeabe3 --- /dev/null +++ b/ext/zlib/tests/gzgetc_error.phpt @@ -0,0 +1,29 @@ +--TEST-- +Test function gzgetc() 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(gzgetc( $h, $extra_arg ) ); + +var_dump(gzgetc() ); + +gzclose($h); +?> +===DONE=== +--EXPECTF-- + +Warning: gzgetc() expects exactly 1 parameter, 2 given in %s on line %d +bool(false) + +Warning: gzgetc() expects exactly 1 parameter, 0 given in %s on line %d +bool(false) +===DONE===
\ No newline at end of file |