Annotation of embedaddon/php/ext/zlib/tests/readgzfile_variation8.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test function readgzfile() by substituting agument 2 with array 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: $index_array = array(1, 2, 3);
15: $assoc_array = array(1 => 'one', 2 => 'two');
16:
17: $variation = array(
18: 'empty array' => array(),
19: 'int indexed array' => $index_array,
20: 'associative array' => $assoc_array,
21: 'nested arrays' => array('foo', $index_array, $assoc_array),
22: );
23:
24:
25: foreach ( $variation as $var ) {
26: var_dump(readgzfile( $filename, $var ) );
27: }
28: ?>
29: ===DONE===
30: --EXPECTF--
31:
32: Warning: readgzfile() expects parameter 2 to be long, array given in %s on line %d
33: NULL
34:
35: Warning: readgzfile() expects parameter 2 to be long, array given in %s on line %d
36: NULL
37:
38: Warning: readgzfile() expects parameter 2 to be long, array given in %s on line %d
39: NULL
40:
41: Warning: readgzfile() expects parameter 2 to be long, array given in %s on line %d
42: NULL
43: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>