Annotation of embedaddon/php/ext/zlib/tests/readgzfile_variation10.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test function readgzfile() by substituting agument 2 with emptyUnsetUndefNull values.
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: $filename = dirname(__FILE__)."/004.txt.gz";
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( $filename, $var ) );
29: }
30: ?>
31: ===DONE===
32: --EXPECTF--
33: When you're taught through feelings
34: Destiny flying high above
35: all I know is that you can realize it
36: Destiny who cares
37: as it turns around
38: and I know that it descends down on me
39: int(176)
40: When you're taught through feelings
41: Destiny flying high above
42: all I know is that you can realize it
43: Destiny who cares
44: as it turns around
45: and I know that it descends down on me
46: int(176)
47:
48: Warning: readgzfile() expects parameter 2 to be long, string given in %s on line %d
49: NULL
50:
51: Warning: readgzfile() expects parameter 2 to be long, string given in %s on line %d
52: NULL
53: When you're taught through feelings
54: Destiny flying high above
55: all I know is that you can realize it
56: Destiny who cares
57: as it turns around
58: and I know that it descends down on me
59: int(176)
60: When you're taught through feelings
61: Destiny flying high above
62: all I know is that you can realize it
63: Destiny who cares
64: as it turns around
65: and I know that it descends down on me
66: int(176)
67: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>