diff options
| author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-14 05:42:27 +0000 |
|---|---|---|
| committer | <> | 2013-04-03 16:25:08 +0000 |
| commit | c4dd7a1a684490673e25aaf4fabec5df138854c4 (patch) | |
| tree | 4d57c44caae4480efff02b90b9be86f44bf25409 /ext/zlib/tests/004.phpt | |
| download | php2-master.tar.gz | |
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/zlib/tests/004.phpt')
| -rw-r--r-- | ext/zlib/tests/004.phpt | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/ext/zlib/tests/004.phpt b/ext/zlib/tests/004.phpt new file mode 100644 index 0000000..ebc7d82 --- /dev/null +++ b/ext/zlib/tests/004.phpt @@ -0,0 +1,66 @@ +--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)); + +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 +" +} +Done |
