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