/** * @test */ public function testFileOwnerName() { $file = new Filesystem(); $dir = static::getTempPath(__FUNCTION__); mkdir($dir); $file1 = rand(1, 10) . rand(0, getrandmax()); $path1 = $dir . DIRECTORY_SEPARATOR . $file1; file_put_contents($path1, __FUNCTION__, FILE_APPEND); $owner = $file->getFileOwner($path1); $getpwuid = posix_getpwuid(posix_geteuid()); $this->assertEquals($getpwuid['name'], $owner['name']); }