Skip to content

Commit

Permalink
Create test for unwrapping formatted numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
hmerritt committed Jun 3, 2021
1 parent 6283103 commit 96108c2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/HtmlPiecesTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

use PHPUnit\Framework\TestCase;
use hmerritt\HtmlPieces;

class HtmlPiecesTest extends TestCase {

public function test_unwrapFormattedNumber()
{
$htmlPieces = new HtmlPieces;

$this->assertEquals("1500000", $htmlPieces->unwrapFormattedNumber("1.5M"));
$this->assertEquals("1200", $htmlPieces->unwrapFormattedNumber("1.2K"));
$this->assertEquals("1.8", $htmlPieces->unwrapFormattedNumber("1.8"));
// $this->assertEquals($expected, $actual);
}

}

0 comments on commit 96108c2

Please sign in to comment.