Annotation of embedaddon/php/ext/posix/tests/posix_ttyname_variation1.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test function posix_ttyname() by substituting argument 1 with array values.
3: --CREDITS--
4: Marco Fabbri mrfabbri@gmail.com
5: Francesco Fullone ff@ideato.it
6: #PHPTestFest Cesena Italia on 2009-06-20
7: --SKIPIF--
8: <?php
9: if (!extension_loaded('posix')) {
10: die('SKIP The posix extension is not loaded.');
11: }
12: ?>
13: --FILE--
14: <?php
15:
16:
17: echo "*** Test substituting argument 1 with array values ***\n";
18:
19:
20:
21: $index_array = array(1, 2, 3);
22: $assoc_array = array(1 => 'one', 2 => 'two');
23:
24: $variation_array = array(
25: 'empty array' => array(),
26: 'int indexed array' => $index_array,
27: 'associative array' => $assoc_array,
28: 'nested arrays' => array('foo', $index_array, $assoc_array),
29: );
30:
31:
32: foreach ( $variation_array as $var ) {
33: var_dump(posix_ttyname( $var ) );
34: }
35: ?>
36: --EXPECTF--
37: *** Test substituting argument 1 with array values ***
38: bool(false)
39: bool(false)
40: bool(false)
41: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>