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