/** * @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); }
/** * @param bool $rawSize * * @return string|int */ public function getSize($rawSize = false) { return $this->formatter->formatSize($this->splFileInfo, $rawSize); }