Annotation of embedaddon/php/ext/posix/tests/posix_seteuid_variation3.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test function posix_seteuid() by substituting argument 1 with emptyUnsetUndefNull 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 emptyUnsetUndefNull values ***\n";
! 17:
! 18:
! 19:
! 20: $unset_var = 10;
! 21: unset($unset_var);
! 22:
! 23: $variation_array = array(
! 24: 'unset var' => @$unset_var,
! 25: 'undefined var' => @$undefined_var,
! 26: 'empty string DQ' => "",
! 27: 'empty string SQ' => '',
! 28: 'uppercase NULL' => NULL,
! 29: 'lowercase null' => null,
! 30: );
! 31:
! 32:
! 33: foreach ( $variation_array as $var ) {
! 34: var_dump(posix_seteuid( $var ) );
! 35: }
! 36: ?>
! 37: --EXPECTF--
! 38: *** Test substituting argument 1 with emptyUnsetUndefNull values ***
! 39: bool(false)
! 40: bool(false)
! 41:
! 42: Warning: posix_seteuid() expects parameter 1 to be long, string given in %s on line 22
! 43: bool(false)
! 44:
! 45: Warning: posix_seteuid() expects parameter 1 to be long, string given in %s on line 22
! 46: bool(false)
! 47: bool(false)
! 48: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>