protected function ModuleIntegrationTest::checkHighlightedText in Thunder 6.2.x
Same name and namespace in other branches
- 8.5 tests/src/FunctionalJavascript/ModuleIntegrationTest.php \Drupal\Tests\thunder\FunctionalJavascript\ModuleIntegrationTest::checkHighlightedText()
- 8.2 tests/src/FunctionalJavascript/ModuleIntegrationTest.php \Drupal\Tests\thunder\FunctionalJavascript\ModuleIntegrationTest::checkHighlightedText()
- 8.3 tests/src/FunctionalJavascript/ModuleIntegrationTest.php \Drupal\Tests\thunder\FunctionalJavascript\ModuleIntegrationTest::checkHighlightedText()
- 8.4 tests/src/FunctionalJavascript/ModuleIntegrationTest.php \Drupal\Tests\thunder\FunctionalJavascript\ModuleIntegrationTest::checkHighlightedText()
- 6.0.x tests/src/FunctionalJavascript/ModuleIntegrationTest.php \Drupal\Tests\thunder\FunctionalJavascript\ModuleIntegrationTest::checkHighlightedText()
- 6.1.x tests/src/FunctionalJavascript/ModuleIntegrationTest.php \Drupal\Tests\thunder\FunctionalJavascript\ModuleIntegrationTest::checkHighlightedText()
Check more highlighted text in rows.
Parameters
string $fieldName: Human defined field name.
int $columnIndex: Index of column in diff table that should be used to check.
array $highlightedTextRows: New highlighted texts per row.
1 call to ModuleIntegrationTest::checkHighlightedText()
- ModuleIntegrationTest::validateDiff in tests/
src/ FunctionalJavascript/ ModuleIntegrationTest.php - Validate diff entry for one field.
File
- tests/
src/ FunctionalJavascript/ ModuleIntegrationTest.php, line 91
Class
- ModuleIntegrationTest
- Testing of module integrations.
Namespace
Drupal\Tests\thunder\FunctionalJavascriptCode
protected function checkHighlightedText($fieldName, $columnIndex, array $highlightedTextRows) {
$page = $this
->getSession()
->getPage();
foreach ($highlightedTextRows as $indexRow => $expectedTexts) {
foreach ($expectedTexts as $indexHighlighted => $expectedText) {
$highlightedText = $page
->find('xpath', "//tr[./td[text()=\"{$fieldName}\"]]/following-sibling::tr[{$indexRow}]/td[{$columnIndex}]/span[" . ($indexHighlighted + 1) . "]")
->getText();
$this
->assertEquals($expectedText, htmlspecialchars_decode($highlightedText, ENT_QUOTES | ENT_HTML401));
}
}
}