Exemplo n.º 1
0
 /**
  * @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);
 }
Exemplo n.º 2
0
 /**
  * @param string $prepend
  *
  * @return string
  */
 public function getExtension($prepend = '')
 {
     return $this->pathHelper->getExtension($this->splFileInfo, $prepend);
 }