PhpBench\Tests\Unit\Formatter\Format\TruncateFormatTest::testTruncate PHP Method

testTruncate() public method

It has a truncate function that truncates strings.
public testTruncate ( $expected, $value, $length, $position = 'left', $pad = '...' )
    public function testTruncate($expected, $value, $length, $position = 'left', $pad = '...')
    {
        $result = $this->format->format($value, ['length' => $length, 'position' => $position, 'pad' => $pad]);
        $this->assertEquals($expected, $result);
    }