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