示例#1
0
 /**
  * @covers   DmFileman\Helper\FileInfo\Formatter
  * @requires PHP 5.6
  */
 public function testFormatOwner()
 {
     $userId = posix_geteuid();
     $splFileInfoMock = $this->getSplFileInfoMock();
     $splFileInfoMock->expects($this->any())->method('getOwner')->will($this->returnValue($userId));
     $actualResult = $this->sut->formatOwner($splFileInfoMock);
     $this->assertEquals(posix_getpwuid($userId)['name'], $actualResult);
 }
示例#2
0
 /**
  * @return string
  */
 public function getOwner()
 {
     return $this->formatter->formatOwner($this->splFileInfo);
 }