Skip to content

Commit

Permalink
add test for to bytes serialisation decimals fix
Browse files Browse the repository at this point in the history
  • Loading branch information
d8vjork committed Dec 25, 2023
1 parent 416cb47 commit 4061b70
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/ByteUnitConverterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,12 @@ public function testConversionSerializesObjectInstance()

$this->assertEquals((string) $instance, (string) $deserialized->asRound());
}

public function testConversionToBytesDoesNotGiveDecimals()
{
$this->assertEquals(
'1000 B',
(string) ByteUnitConverter::new('1000')
);
}
}

0 comments on commit 4061b70

Please sign in to comment.