You are here

protected function ModuleIntegrationTest::validateDiff in Thunder 6.2.x

Same name and namespace in other branches
  1. 8.5 tests/src/FunctionalJavascript/ModuleIntegrationTest.php \Drupal\Tests\thunder\FunctionalJavascript\ModuleIntegrationTest::validateDiff()
  2. 8.2 tests/src/FunctionalJavascript/ModuleIntegrationTest.php \Drupal\Tests\thunder\FunctionalJavascript\ModuleIntegrationTest::validateDiff()
  3. 8.3 tests/src/FunctionalJavascript/ModuleIntegrationTest.php \Drupal\Tests\thunder\FunctionalJavascript\ModuleIntegrationTest::validateDiff()
  4. 8.4 tests/src/FunctionalJavascript/ModuleIntegrationTest.php \Drupal\Tests\thunder\FunctionalJavascript\ModuleIntegrationTest::validateDiff()
  5. 6.0.x tests/src/FunctionalJavascript/ModuleIntegrationTest.php \Drupal\Tests\thunder\FunctionalJavascript\ModuleIntegrationTest::validateDiff()
  6. 6.1.x tests/src/FunctionalJavascript/ModuleIntegrationTest.php \Drupal\Tests\thunder\FunctionalJavascript\ModuleIntegrationTest::validateDiff()

Validate diff entry for one field.

Parameters

string $fieldName: Human defined field name.

array $previous: Associative array with previous text per row.

array $previousHighlighted: Previous highlighted texts.

array $new: Associative array with new text per row.

array $newHighlighted: New highlighted texts.

1 call to ModuleIntegrationTest::validateDiff()
ModuleIntegrationTest::testDiffModule in tests/src/FunctionalJavascript/ModuleIntegrationTest.php
Testing integration of "diff" module.

File

tests/src/FunctionalJavascript/ModuleIntegrationTest.php, line 46

Class

ModuleIntegrationTest
Testing of module integrations.

Namespace

Drupal\Tests\thunder\FunctionalJavascript

Code

protected function validateDiff($fieldName, array $previous = [], array $previousHighlighted = [], array $new = [], array $newHighlighted = []) {

  // Check for old Text.
  $this
    ->checkFullText($fieldName, static::$previousTextColumn, $previous);

  // Check for new Text.
  $this
    ->checkFullText($fieldName, static::$newTextColumn, $new);

  // Check for highlighted Deleted text.
  $this
    ->checkHighlightedText($fieldName, static::$previousTextColumn, $previousHighlighted);

  // Check for highlighted Added text.
  $this
    ->checkHighlightedText($fieldName, static::$newTextColumn, $newHighlighted);
}