public function TruncateHTMLTest::testTruncateChars in Smart Trim 8
Testing truncateChars.
@covers ::truncateChars
@dataProvider truncateCharsDataProvider
File
- tests/
src/ Unit/ TruncateHTMLTest.php, line 24
Class
- TruncateHTMLTest
- Unit Test coverage.
Namespace
Drupal\Tests\smart_trim\UnitCode
public function testTruncateChars($html, $limit, $ellipsis, $expected) {
$truncate = new TruncateHTML();
$this
->assertSame($expected, $truncate
->truncateChars($html, $limit, $ellipsis));
}