Skip to content

Commit

Permalink
added skipif for root
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoe Slattery committed Mar 20, 2009
1 parent a2ad68d commit bdfafa3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ext/standard/tests/file/tempnam_variation4.phpt
Expand Up @@ -5,6 +5,16 @@ Test tempnam() function: usage variations - permissions(0000 to 0777) of dir
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip Not valid for Windows');
}
// Skip if being run by root
$filename = dirname(__FILE__)."/is_readable_root_check.tmp";
$fp = fopen($filename, 'w');
fclose($fp);
if(fileowner($filename) == 0) {
unlink ($filename);
die('skip cannot be run as root');
}

unlink($filename);
?>
--FILE--
<?php
Expand Down

0 comments on commit bdfafa3

Please sign in to comment.