Annotation of embedaddon/php/ext/posix/tests/posix_setgid_variation7.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test function posix_setgid() by substituting argument 1 with string 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")) print "skip - POSIX extension not loaded";
10: ?>
11: --FILE--
12: <?php
13:
14:
15: echo "*** Test substituting argument 1 with string values ***\n";
16:
17:
18:
19: $heredoc = <<<EOT
20: hello world
21: EOT;
22:
23: $variation_array = array(
24: 'string DQ' => "string",
25: 'string SQ' => 'string',
26: 'mixed case string' => "sTrInG",
27: 'heredoc' => $heredoc,
28: );
29:
30:
31: foreach ( $variation_array as $var ) {
32: var_dump(posix_setgid( $var ) );
33: }
34: ?>
35: --EXPECTF--
36: *** Test substituting argument 1 with string values ***
37:
38: Warning: posix_setgid() expects parameter 1 to be long, string given in %s on line %d
39: bool(false)
40:
41: Warning: posix_setgid() expects parameter 1 to be long, string given in %s on line %d
42: bool(false)
43:
44: Warning: posix_setgid() expects parameter 1 to be long, string given in %s on line %d
45: bool(false)
46:
47: Warning: posix_setgid() expects parameter 1 to be long, string given in %s on line %d
48: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>