Skip to content

Commit 10a0739

Browse files
committed
test: add test cases
1 parent 482b8bb commit 10a0739

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/system/Helpers/NumberHelperTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ public function testRomanNumber(): void
3838
$this->assertSame('X', number_to_roman(10));
3939
}
4040

41+
public function testRomanNumberString(): void
42+
{
43+
$this->assertSame('XCVI', number_to_roman('96'));
44+
}
45+
4146
public function testRomanNumberRange(): void
4247
{
4348
$this->assertNull(number_to_roman(-1));
@@ -70,6 +75,11 @@ public function testNumberToSize(): void
7075
$this->assertSame('456 Bytes', number_to_size(456, 1, 'en_US'));
7176
}
7277

78+
public function testNumberToSizeString(): void
79+
{
80+
$this->assertSame('456 Bytes', number_to_size('456', 1, 'en_US'));
81+
}
82+
7383
public function testKbFormat(): void
7484
{
7585
$this->assertSame('4.5 KB', number_to_size(4567, 1, 'en_US'));
@@ -109,6 +119,11 @@ public function testThousands(): void
109119
$this->assertSame('1,000 thousand', number_to_amount('999999', 0, 'en_US'));
110120
}
111121

122+
public function testThousandsInt(): void
123+
{
124+
$this->assertSame('123 thousand', number_to_amount(123000, 0, 'en_US'));
125+
}
126+
112127
public function testMillions(): void
113128
{
114129
$this->assertSame('123.4 million', number_to_amount('123,400,000', 1, 'en_US'));

0 commit comments

Comments
 (0)