You are here

public function TypogrifySmartyPantsTest::testTypogrify in Typogrify 8

Tests the filter, along with the Typogrify and SmartyPants libraries.

@dataProvider providerTypogrifyExamples

File

tests/src/Kernel/TypogrifySmartyPantsTest.php, line 45

Class

TypogrifySmartyPantsTest
Test the application of the full package of Typogrify and SmartyPants.

Namespace

Drupal\Tests\typogrify\Kernel

Code

public function testTypogrify(array $extra_settings, string $original, string $processed) {
  $configuration = [
    'settings' => $extra_settings + $this->baseSettings,
  ];
  $manager = $this->container
    ->get('plugin.manager.filter');
  $bag = new FilterPluginCollection($manager, []);
  $filter = $bag
    ->get('typogrify');
  $filter
    ->setConfiguration($configuration);
  $this
    ->assertEquals($processed, $filter
    ->process($original, 'en'));
}