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