diff options
Diffstat (limited to 'ext/zlib/tests/gzfile_error.phpt')
-rw-r--r-- | ext/zlib/tests/gzfile_error.phpt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ext/zlib/tests/gzfile_error.phpt b/ext/zlib/tests/gzfile_error.phpt new file mode 100644 index 0000000..6089f3e --- /dev/null +++ b/ext/zlib/tests/gzfile_error.phpt @@ -0,0 +1,29 @@ +--TEST-- +Test function gzfile() by calling it more than or less than its expected arguments +--SKIPIF-- +<?php +if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); +?> +--FILE-- +<?php + + +$filename = dirname(__FILE__)."/004.txt.gz"; +$use_include_path = false; +$extra_arg = 'nothing'; + +var_dump(gzfile( $filename, $use_include_path, $extra_arg ) ); + +var_dump(gzfile( ) ); + + +?> +===DONE=== +--EXPECTF-- + +Warning: gzfile() expects at most 2 parameters, 3 given in %s on line %d +NULL + +Warning: gzfile() expects at least 1 parameter, 0 given in %s on line %d +NULL +===DONE===
\ No newline at end of file |