| Total Complexity | 2 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | final class FormatTest extends \PHPUnit\Framework\TestCase |
||
| 10 | { |
||
| 11 | public function truncateProvider(): array |
||
| 12 | { |
||
| 13 | return [ |
||
| 14 | [['abcdef', 100], 'abcdef'], |
||
| 15 | [['abcdef', 6], 'abcdef'], |
||
| 16 | [['abcdef', 3], 'ab…'], |
||
| 17 | [['abcdef', 3, ''], 'abc'], |
||
| 18 | [['abcdefghi', 5, 'foo'], 'abfoo'], |
||
| 19 | ]; |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @dataProvider truncateProvider |
||
| 24 | * |
||
| 25 | * @param string $expected |
||
| 26 | */ |
||
| 27 | public function testTruncate(array $args, $expected): void |
||
| 31 | } |
||
| 32 | } |
||
| 33 |