Annotation of embedaddon/php/ext/posix/tests/posix_setuid_variation1.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test function posix_setuid() 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: $index_array = array(1, 2, 3);
        !            15: $assoc_array = array(1 => 'one', 2 => 'two');
        !            16: 
        !            17: $variation_array = 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_array as $var ) {
        !            26:   var_dump(posix_setuid( $var  ) );
        !            27: }
        !            28: 
        !            29: ?>
        !            30: --EXPECTF--
        !            31: Warning: posix_setuid() expects parameter 1 to be long, array given in %s on line 15
        !            32: bool(false)
        !            33: 
        !            34: Warning: posix_setuid() expects parameter 1 to be long, array given in %s on line 15
        !            35: bool(false)
        !            36: 
        !            37: Warning: posix_setuid() expects parameter 1 to be long, array given in %s on line 15
        !            38: bool(false)
        !            39: 
        !            40: Warning: posix_setuid() expects parameter 1 to be long, array given in %s on line 15
        !            41: bool(false)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>