diff --git a/tests/Support/FileTest.php b/tests/Support/FileTest.php index dfdac19d3..6d681bfc2 100644 --- a/tests/Support/FileTest.php +++ b/tests/Support/FileTest.php @@ -8,6 +8,7 @@ expect(File::getHumanReadableSize(1000))->toEqual('1000 B'); expect(File::getHumanReadableSize(10000))->toEqual('9.77 KB'); expect(File::getHumanReadableSize(10000))->toEqual('9.77 KB'); + expect(File::getHumanReadableSize(-10000))->toEqual('9.77 KB'); $this->assertEquals('976.56 KB', File::getHumanReadableSize(1_000_000)); $this->assertEquals('9.54 MB', File::getHumanReadableSize(10_000_000)); $this->assertEquals('9.31 GB', File::getHumanReadableSize(10_000_000_000)); @@ -16,6 +17,7 @@ $this->assertEquals('86.74 EB', File::getHumanReadableSize(100_000_000_000_000_000_000)); $this->assertEquals('84.7 ZB', File::getHumanReadableSize(100_000_000_000_000_000_000_000)); $this->assertEquals('82.72 YB', File::getHumanReadableSize(100_000_000_000_000_000_000_000_000)); + $this->assertEquals('82.72 YB', File::getHumanReadableSize(-100_000_000_000_000_000_000_000_000)); }); it('can determine the mime type of a file', function () {