mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-02-17 07:39:54 +03:00
20 lines
470 B
PHP
20 lines
470 B
PHP
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace RssBridge\Tests;
|
||
|
|
||
|
use PHPUnit\Framework\TestCase;
|
||
|
|
||
|
final class UtilsTest extends TestCase
|
||
|
{
|
||
|
public function testTruncate()
|
||
|
{
|
||
|
$this->assertSame('f...', truncate('foo', 1));
|
||
|
$this->assertSame('fo...', truncate('foo', 2));
|
||
|
$this->assertSame('foo', truncate('foo', 3));
|
||
|
$this->assertSame('foo', truncate('foo', 4));
|
||
|
$this->assertSame('fo[...]', truncate('foo', 2, '[...]'));
|
||
|
}
|
||
|
}
|