/** * @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); }
/** * @return string */ public function getOwner() { return $this->formatter->formatOwner($this->splFileInfo); }