14 require_once(dirname(__FILE__) .
'/../common-ui.php');
22 protected function setUp() :
void
33 print
"Ending unit test for common-ui.php\n";
41 print
"test function HumanSize()\n";
43 $this->assertEquals(
"1 GB", $result);
45 $this->assertEquals(
"10 KB", $result);
46 $result =
HumanSize(1024 * (1024 * 99 + 511));
47 $this->assertEquals(
"99.5 MB", $result);
test_HumanSize()
test for HumanSize
HumanSize( $bytes)
Translate a byte number to a proper type, xxx bytes to xxx B/KB/MB/GB/TB/PB.