Annotation of embedaddon/php/ext/zlib/tests/gzfile_variation1.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test function gzfile() by substituting agument 1 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: $use_include_path = false;
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(gzfile( $var , $use_include_path ) );
27: }
28: ?>
29: ===DONE===
30: --EXPECTF--
31:
32: Warning: gzfile() expects parameter 1 to be string, array given in %s on line %d
33: NULL
34:
35: Warning: gzfile() expects parameter 1 to be string, array given in %s on line %d
36: NULL
37:
38: Warning: gzfile() expects parameter 1 to be string, array given in %s on line %d
39: NULL
40:
41: Warning: gzfile() expects parameter 1 to be string, array given in %s on line %d
42: NULL
43: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>