/** * @covers DmFileman\Helper\FileInfo\Path * @requires PHP 5.6 */ public function testGetTypeThumbnailPathReturnsExtensionIconWhenFound() { $splFileInfoMock = $this->getMock('\\SplFileInfo', ['getExtension', 'isDir'], [], '', false); $splFileInfoMock->expects($this->any())->method('isDir')->will($this->returnValue(false)); $splFileInfoMock->expects($this->any())->method('getExtension')->will($this->returnValue('jpg')); $actualResult = $this->sut->getTypeThumbnailPath($splFileInfoMock); $this->assertEquals('/img/filemanager/image.png', $actualResult); }
/** * @return string */ public function getTypeThumbnailPath() { return $this->pathHelper->getTypeThumbnailPath($this->splFileInfo); }