You are here

public function NbspCleanerFilterTest::providerTexts in CKEditor Non-breaking space Plugin ( ) 8.2

Same name and namespace in other branches
  1. 8 tests/src/Kernel/NbspCleanerFilterTest.php \Drupal\Tests\nbsp\Kernel\NbspCleanerFilterTest::providerTexts()

Provides texts to check and expected results.

File

tests/src/Kernel/NbspCleanerFilterTest.php, line 59

Class

NbspCleanerFilterTest
@coversDefaultClass \Drupal\nbsp\Plugin\Filter\NbspCleanerFilter

Namespace

Drupal\Tests\nbsp\Kernel

Code

public function providerTexts() {
  return [
    [
      '',
      '',
    ],
    [
      '<p>Maecenas cursus posuere</p>',
      '<p>Maecenas cursus posuere</p>',
    ],
    [
      '<p>Maecenas<span class="nbsp">&nbsp;</span>cursus posuere</p>',
      '<p>Maecenas cursus posuere</p>',
    ],
    [
      '<p>Maecenas<span class="nbsp">&nbsp;</span>cursus<span class="nbsp">&nbsp;</span>posuere</p>',
      '<p>Maecenas cursus posuere</p>',
    ],
    [
      '<p>Maecenas<div class="nbsp">&nbsp;</div>cursus posuere</p>',
      '<p>Maecenas</p><div class="nbsp"> </div>cursus posuere',
    ],
    [
      '<p>Maecenas<span>&nbsp;</span>cursus posuere</p>',
      '<p>Maecenas<span> </span>cursus posuere</p>',
    ],
  ];
}