/** * @covers DmFileman\Helper\FileInfo\Path * @requires PHP 5.6 */ public function testGetExtensionReturnsExtensionAndPrependsPrepend() { $splFileInfoMock = $this->getMock('\\SplFileInfo', ['getExtension'], [], '', false); $splFileInfoMock->expects($this->any())->method('getExtension')->will($this->returnValue('foo')); $actualResult = $this->sut->getExtension($splFileInfoMock, '.'); $this->assertEquals('.foo', $actualResult); }
/** * @param string $prepend * * @return string */ public function getExtension($prepend = '') { return $this->pathHelper->getExtension($this->splFileInfo, $prepend); }