public function NbspCleanerFilterTest::testCleanerFilter in CKEditor Non-breaking space Plugin ( ) 8
Same name and namespace in other branches
- 8.2 tests/src/Kernel/NbspCleanerFilterTest.php \Drupal\Tests\nbsp\Kernel\NbspCleanerFilterTest::testCleanerFilter()
@covers ::process
@dataProvider providerTexts
File
- tests/
src/ Kernel/ NbspCleanerFilterTest.php, line 47
Class
- NbspCleanerFilterTest
- @coversDefaultClass \Drupal\nbsp\Plugin\Filter\NbspCleanerFilter
Namespace
Drupal\Tests\nbsp\KernelCode
public function testCleanerFilter($input, $expected) {
$filter = $this->filters['nbsp_cleaner_filter'];
/** @var \Drupal\filter\FilterProcessResult $result */
$result = $filter
->process($input, 'und');
$this
->assertInstanceOf(FilterProcessResult::class, $result);
$this
->assertEquals($expected, $result
->getProcessedText());
}