$actualFilePerms =
(int) substr(sprintf('%o',
fileperms($filePath)), -3
);
$this->
assertEquals( $expectedFilePerms,
$actualFilePerms,
sprintf('File permissions for %s must be %s. Actual %s',
$filePath,
$expectedFilePerms,
$actualFilePerms) );
} protected function getFileOwnerId($filepath) { $this->
markAsSkippedIfPosixIsMissing();
$infos =
stat($filepath);
return $infos['uid'
];
} protected function getFileOwner($filepath) { $this->
markAsSkippedIfPosixIsMissing();
return ($datas =
posix_getpwuid($this->
getFileOwnerId($filepath))) ?
$datas['name'
] : null;
}