You are here

public function HWLDFWordAccumulatorTest::testAddWords in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Component/Diff/Engine/HWLDFWordAccumulatorTest.php \Drupal\Tests\Component\Diff\Engine\HWLDFWordAccumulatorTest::testAddWords()
  2. 9 core/tests/Drupal/Tests/Component/Diff/Engine/HWLDFWordAccumulatorTest.php \Drupal\Tests\Component\Diff\Engine\HWLDFWordAccumulatorTest::testAddWords()

@covers ::addWords @dataProvider provideAddWords

File

core/tests/Drupal/Tests/Component/Diff/Engine/HWLDFWordAccumulatorTest.php, line 47

Class

HWLDFWordAccumulatorTest
Test HWLDFWordAccumulator.

Namespace

Drupal\Tests\Component\Diff\Engine

Code

public function testAddWords($expected, $words, $tag) {
  $acc = new HWLDFWordAccumulator();
  $acc
    ->addWords($words, $tag);
  $this
    ->assertEquals($expected, $acc
    ->getLines());
}