Add StringFormatter test.
This commit is contained in:
parent
b9f37af5c1
commit
f528660abb
40
test/unit/StringFormatterTest.php
Normal file
40
test/unit/StringFormatterTest.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Test\Unit;
|
||||
|
||||
use Test\TestCase;
|
||||
use Web3\Formatters\StringFormatter;
|
||||
|
||||
class StringFormatterTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* formatter
|
||||
*
|
||||
* @var \Web3\Formatters\StringFormatter
|
||||
*/
|
||||
protected $formatter;
|
||||
|
||||
/**
|
||||
* setUp
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->formatter = new StringFormatter;
|
||||
}
|
||||
|
||||
/**
|
||||
* testFormat
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testFormat()
|
||||
{
|
||||
$formatter = $this->formatter;
|
||||
|
||||
$str = $formatter->format(123456);
|
||||
$this->assertEquals($str, '123456');
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user