25 require_once(dirname(__FILE__) .
'/../common-ui.php');
33 protected function setUp()
44 print
"Ending unit test for common-ui.php\n";
52 print
"test function HumanSize()\n";
54 $this->assertEquals(
"1 GB", $result);
56 $this->assertEquals(
"10 KB", $result);
57 $result =
HumanSize(1024 * (1024 * 99 + 511));
58 $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.