Skip to content

Commit

Permalink
add negative test
Browse files Browse the repository at this point in the history
  • Loading branch information
TomK committed Jun 17, 2016
1 parent 9bd8fc0 commit 3c13584
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/NumbersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ public function testFormatSuffix()
$this->assertEquals('1b', Numbers::humanize(1000000000));
$this->assertEquals('1t', Numbers::humanize(1000000000000));

$this->assertEquals('-100', Numbers::humanize(-100));
$this->assertEquals('-1k', Numbers::humanize(-1000));
$this->assertEquals('-12.5k', Numbers::humanize(-12500));
$this->assertEquals('-1m', Numbers::humanize(-1000000));
$this->assertEquals('-1b', Numbers::humanize(-1000000000));
$this->assertEquals('-1t', Numbers::humanize(-1000000000000));

$this->assertEquals('100', Numbers::humanize(100, true));
$this->assertEquals('1k', Numbers::humanize(1000, true));
$this->assertEquals('12.5k', Numbers::humanize(12500, true));
Expand Down

0 comments on commit 3c13584

Please sign in to comment.