posix_setgid_variation5.phpt 677 B

123456789101112131415161718192021222324252627282930313233343536
  1. --TEST--
  2. Test function posix_setgid() by substituting argument 1 with int values.
  3. --EXTENSIONS--
  4. posix
  5. --SKIPIF--
  6. <?php
  7. if(posix_geteuid() == 0) print "skip - Cannot run test as root.";
  8. ?>
  9. --CREDITS--
  10. Marco Fabbri mrfabbri@gmail.com
  11. Francesco Fullone ff@ideato.it
  12. #PHPTestFest Cesena Italia on 2009-06-20
  13. --FILE--
  14. <?php
  15. echo "*** Test substituting argument 1 with int values ***\n";
  16. $variation_array = array (
  17. 'long 0' => 0,
  18. 'long 1' => 1,
  19. 'int -12345' => -2345,
  20. );
  21. foreach ( $variation_array as $var ) {
  22. var_dump(posix_setgid( $var ) );
  23. }
  24. ?>
  25. --EXPECT--
  26. *** Test substituting argument 1 with int values ***
  27. bool(false)
  28. bool(false)
  29. bool(false)