Convert : if the value is 0 for humansize, return 0.000

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5731 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2019-11-15 21:34:10 +00:00
parent 78922b2521
commit 94191fa144
2 changed files with 14 additions and 2 deletions

View File

@@ -105,6 +105,13 @@ class test_convert extends PHPUnit_Framework_TestCase
$this->assertSame ($res, "-12.35kB");
}
public function test_humanSize_8 ()
{
$res = \convert::humanSize (0, 2);
$this->assertSame ($res, "0.00B");
}
public function test_humanSize_error1 ()
{
$this->expectException ("Exception",