Annotation of embedaddon/php/ext/zlib/tests/readgzfile_variation3.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
1.1.1.2 ! misho 2: Test function readgzfile() by substituting argument 1 with emptyUnsetUndefNull values.
1.1 misho 3: --SKIPIF--
4: <?php
5: if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
6: ?>
7: --FILE--
8: <?php
9:
10:
11: $use_include_path = false;
12:
13:
14: $unset_var = 10;
15: unset($unset_var);
16:
17: $variation = array(
18: 'unset var' => @$unset_var,
19: 'undefined var' => @$undefined_var,
20: 'empty string DQ' => "",
21: 'empty string SQ' => '',
22: 'uppercase NULL' => NULL,
23: 'lowercase null' => null,
24: );
25:
26:
27: foreach ( $variation as $var ) {
28: var_dump(readgzfile( $var , $use_include_path ) );
29: }
30: ?>
31: ===DONE===
32: --EXPECTF--
33: Warning: readgzfile(): Filename cannot be empty in %s on line %d
34: bool(false)
35:
36: Warning: readgzfile(): Filename cannot be empty in %s on line %d
37: bool(false)
38:
39: Warning: readgzfile(): Filename cannot be empty in %s on line %d
40: bool(false)
41:
42: Warning: readgzfile(): Filename cannot be empty in %s on line %d
43: bool(false)
44:
45: Warning: readgzfile(): Filename cannot be empty in %s on line %d
46: bool(false)
47:
48: Warning: readgzfile(): Filename cannot be empty in %s on line %d
49: bool(false)
50: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>