diff options
Diffstat (limited to 'ext/zlib/tests/readgzfile_variation10.phpt')
| -rw-r--r-- | ext/zlib/tests/readgzfile_variation10.phpt | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/ext/zlib/tests/readgzfile_variation10.phpt b/ext/zlib/tests/readgzfile_variation10.phpt new file mode 100644 index 0000000..29249a1 --- /dev/null +++ b/ext/zlib/tests/readgzfile_variation10.phpt @@ -0,0 +1,67 @@ +--TEST-- +Test function readgzfile() by substituting agument 2 with emptyUnsetUndefNull values. +--SKIPIF-- +<?php +if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); +?> +--FILE-- +<?php + + +$filename = dirname(__FILE__)."/004.txt.gz"; + + +$unset_var = 10; +unset($unset_var); + +$variation = array( + 'unset var' => @$unset_var, + 'undefined var' => @$undefined_var, + 'empty string DQ' => "", + 'empty string SQ' => '', + 'uppercase NULL' => NULL, + 'lowercase null' => null, + ); + + +foreach ( $variation as $var ) { + var_dump(readgzfile( $filename, $var ) ); +} +?> +===DONE=== +--EXPECTF-- +When you're taught through feelings +Destiny flying high above +all I know is that you can realize it +Destiny who cares +as it turns around +and I know that it descends down on me +int(176) +When you're taught through feelings +Destiny flying high above +all I know is that you can realize it +Destiny who cares +as it turns around +and I know that it descends down on me +int(176) + +Warning: readgzfile() expects parameter 2 to be long, string given in %s on line %d +NULL + +Warning: readgzfile() expects parameter 2 to be long, string given in %s on line %d +NULL +When you're taught through feelings +Destiny flying high above +all I know is that you can realize it +Destiny who cares +as it turns around +and I know that it descends down on me +int(176) +When you're taught through feelings +Destiny flying high above +all I know is that you can realize it +Destiny who cares +as it turns around +and I know that it descends down on me +int(176) +===DONE===
\ No newline at end of file |
