isRoot() 공개 정적인 메소드

Check is current user ROOT
public static isRoot ( ) : boolean
리턴 boolean
예제 #1
0
 public function testExecutable()
 {
     if (Sys::isWin()) {
         //skip('This functionality is not working on Windows.');
         return false;
     }
     if (Sys::isRoot()) {
         skip('These tests don\'t work when run as root');
     }
     isFalse(FS::executable('/no/such/file'));
     $dirname = dirname(__FILE__);
     $file = $dirname . '/test9';
     touch($file);
     isFalse(is_executable($file));
     FS::executable($file, true);
     clearstatcache();
     isTrue(is_executable($file));
     FS::executable($file, false);
     clearstatcache();
     isFalse(is_executable($file));
     unlink($file);
 }