예제 #1
0
 /**
  * @covers   DmFileman\Helper\FileInfo\Formatter
  * @requires PHP 5.6
  */
 public function testFormatSizeReturnsRawIfUnitIsNotSet()
 {
     $size = pow(10, 20);
     $splFileInfoMock = $this->getSplFileInfoMock();
     $splFileInfoMock->expects($this->any())->method('getSize')->will($this->returnValue($size));
     $actualResult = $this->sut->formatSize($splFileInfoMock);
     $this->assertEquals($size, $actualResult);
 }
예제 #2
0
 /**
  * @param bool $rawSize
  *
  * @return string|int
  */
 public function getSize($rawSize = false)
 {
     return $this->formatter->formatSize($this->splFileInfo, $rawSize);
 }