Annotation of embedaddon/php/ext/posix/tests/posix_setgid_variation2.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test function posix_setgid() by substituting argument 1 with boolean values.
                      3: --SKIPIF--
                      4: <?php 
                      5:         if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; 
                      6:         if(posix_geteuid() == 0) print "skip - Cannot run test as root.";
                      7: ?>
                      8: --CREDITS--
                      9: Marco Fabbri mrfabbri@gmail.com
                     10: Francesco Fullone ff@ideato.it
                     11: #PHPTestFest Cesena Italia on 2009-06-20
                     12: --FILE--
                     13: <?php
                     14: 
                     15: 
                     16: echo "*** Test substituting argument 1 with boolean values ***\n";
                     17: 
                     18: 
                     19: 
                     20: $variation_array = array(
                     21:   'lowercase true' => true,
                     22:   'lowercase false' =>false,
                     23:   'uppercase TRUE' =>TRUE,
                     24:   'uppercase FALSE' =>FALSE,
                     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 boolean values ***
                     35: bool(false)
                     36: bool(false)
                     37: bool(false)
                     38: bool(false)
                     39: ===DONE===
                     40:        

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