php-src/ext/posix/tests/posix_seteuid_variation2.phpt

38 lines
809 B
Plaintext
Raw Normal View History

2009-08-26 17:17:58 +00:00
--TEST--
Test function posix_seteuid() by substituting argument 1 with boolean values.
--SKIPIF--
2018-10-14 15:45:48 +00:00
<?php
if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
if(posix_geteuid() == 0) print "skip - Cannot run test as root.";
2009-08-26 17:17:58 +00:00
?>
--CREDITS--
Marco Fabbri mrfabbri@gmail.com
Francesco Fullone ff@ideato.it
#PHPTestFest Cesena Italia on 2009-06-20
--FILE--
<?php
echo "*** Test substituting argument 1 with boolean values ***\n";
$variation_array = array(
'lowercase true' => true,
'lowercase false' =>false,
'uppercase TRUE' =>TRUE,
'uppercase FALSE' =>FALSE,
);
foreach ( $variation_array as $var ) {
var_dump(posix_seteuid( $var ) );
}
?>
--EXPECT--
2009-08-26 17:17:58 +00:00
*** Test substituting argument 1 with boolean values ***
bool(false)
bool(false)
bool(false)
bool(false)