Skip to content

Commit

Permalink
[11.x] Feauture - Convert number to a stringable format
Browse files Browse the repository at this point in the history
  • Loading branch information
Raul Mauricio Uñate Castro committed Jan 3, 2025
1 parent 27d22ff commit b805f20
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/Support/SupportNumberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,16 @@ public function testSpelloutWithLocale()
#[RequiresPhpExtension('intl')]
public function testSpelloutWithThreshold()
{
$this->assertSame('9', Number::spell(9, after: 10));
$this->assertSame('10', Number::spell(10, after: 10));
$this->assertSame('eleven', Number::spell(11, after: 10));
$this->assertSame('9', (string) Number::spell(9, after: 10));
$this->assertSame('10', (string) Number::spell(10, after: 10));
$this->assertSame('eleven', (string) Number::spell(11, after: 10));

$this->assertSame('nine', Number::spell(9, until: 10));
$this->assertSame('10', Number::spell(10, until: 10));
$this->assertSame('11', Number::spell(11, until: 10));
$this->assertSame('nine', (string) Number::spell(9, until: 10));
$this->assertSame('10', (string) Number::spell(10, until: 10));
$this->assertSame('11', (string) Number::spell(11, until: 10));

$this->assertSame('ten thousand', Number::spell(10000, until: 50000));
$this->assertSame('100,000', Number::spell(100000, until: 50000));
$this->assertSame('ten thousand', (string) Number::spell(10000, until: 50000));
$this->assertSame('100,000', (string) Number::spell(100000, until: 50000));
}

public function testOrdinal()
Expand Down

0 comments on commit b805f20

Please sign in to comment.