web3.php/test/unit/StringFormatterTest.php
2022-02-26 02:43:32 -03:00

40 lines
657 B
PHP

<?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(): void
{
parent::setUp();
$this->formatter = new StringFormatter;
}
/**
* testFormat
*
* @return void
*/
public function testFormat()
{
$formatter = $this->formatter;
$str = $formatter->format(123456);
$this->assertEquals($str, '123456');
}
}