diff options
| author | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:36:21 -0400 |
|---|---|---|
| committer | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:36:21 -0400 |
| commit | d29a4fd2dd3b5d4cf6e80b602544d7b71d794e76 (patch) | |
| tree | b38e2e5c6974b9a15f103e5cf884cba9fff90ef4 /ext/zlib/tests/004.phpt | |
| parent | a88a88d0986a4a32288c102cdbfebd78d7e91d99 (diff) | |
| download | php-upstream/5.2.0.tar.gz | |
Imported Upstream version 5.2.0upstream/5.2.0
Diffstat (limited to 'ext/zlib/tests/004.phpt')
| -rw-r--r-- | ext/zlib/tests/004.phpt | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/ext/zlib/tests/004.phpt b/ext/zlib/tests/004.phpt new file mode 100644 index 000000000..a758b8c7b --- /dev/null +++ b/ext/zlib/tests/004.phpt @@ -0,0 +1,89 @@ +--TEST-- +gzfile() with various invalid params +--SKIPIF-- +<?php if (!extension_loaded("zlib")) print "skip"; ?> +--FILE-- +<?php + +var_dump(gzfile()); +var_dump(gzfile("nonexistent_file_gzfile",1)); +var_dump(gzfile(1,1,1)); + +var_dump(gzfile(dirname(__FILE__)."/004.txt.gz")); +var_dump(gzfile(dirname(__FILE__)."/004.txt.gz", 1)); + +ini_set("magic_quotes_runtime", 1); +var_dump(gzfile(dirname(__FILE__)."/004.txt.gz", -1)); + +echo "Done\n"; +?> +--EXPECTF-- +Warning: gzfile() expects at least 1 parameter, 0 given in %s on line %d +NULL + +Warning: gzfile(nonexistent_file_gzfile): failed to open stream: No such file or directory in %s on line %d +bool(false) + +Warning: gzfile() expects at most 2 parameters, 3 given in %s on line %d +NULL +array(6) { + [0]=> + string(36) "When you're taught through feelings +" + [1]=> + string(26) "Destiny flying high above +" + [2]=> + string(38) "all I know is that you can realize it +" + [3]=> + string(18) "Destiny who cares +" + [4]=> + string(19) "as it turns around +" + [5]=> + string(39) "and I know that it descends down on me +" +} +array(6) { + [0]=> + string(36) "When you're taught through feelings +" + [1]=> + string(26) "Destiny flying high above +" + [2]=> + string(38) "all I know is that you can realize it +" + [3]=> + string(18) "Destiny who cares +" + [4]=> + string(19) "as it turns around +" + [5]=> + string(39) "and I know that it descends down on me +" +} +array(6) { + [0]=> + string(37) "When you\'re taught through feelings +" + [1]=> + string(26) "Destiny flying high above +" + [2]=> + string(38) "all I know is that you can realize it +" + [3]=> + string(18) "Destiny who cares +" + [4]=> + string(19) "as it turns around +" + [5]=> + string(39) "and I know that it descends down on me +" +} +Done |
