You are here

public function HWLDFWordAccumulatorTest::provideAddWords 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::provideAddWords()
  2. 9 core/tests/Drupal/Tests/Component/Diff/Engine/HWLDFWordAccumulatorTest.php \Drupal\Tests\Component\Diff\Engine\HWLDFWordAccumulatorTest::provideAddWords()

Return value

array

  • Expected array of lines from getLines().
  • Array of strings for the $words parameter to addWords().
  • String tag for the $tag parameter to addWords().

File

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

Class

HWLDFWordAccumulatorTest
Test HWLDFWordAccumulator.

Namespace

Drupal\Tests\Component\Diff\Engine

Code

public function provideAddWords() {
  return [
    [
      [
        'wordword2',
      ],
      [
        'word',
        'word2',
      ],
      'tag',
    ],
    [
      [
        'word',
        'word2',
      ],
      [
        'word',
        "\nword2",
      ],
      'tag',
    ],
    [
      [
        ' ',
        'word2',
      ],
      [
        '',
        "\nword2",
      ],
      'tag',
    ],
  ];
}