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