protected function FieldLayoutTest::getRegionTitles in Drupal 8
Same name in this branch
- 8 core/modules/field_layout/tests/src/Functional/FieldLayoutTest.php \Drupal\Tests\field_layout\Functional\FieldLayoutTest::getRegionTitles()
- 8 core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php \Drupal\Tests\field_layout\FunctionalJavascript\FieldLayoutTest::getRegionTitles()
Same name and namespace in other branches
- 9 core/modules/field_layout/tests/src/Functional/FieldLayoutTest.php \Drupal\Tests\field_layout\Functional\FieldLayoutTest::getRegionTitles()
Gets the region titles on the page.
Return value
string[] An array of region titles.
2 calls to FieldLayoutTest::getRegionTitles()
- FieldLayoutTest::testNodeView in core/
modules/ field_layout/ tests/ src/ Functional/ FieldLayoutTest.php - Tests an entity type that has fields shown by default.
- FieldLayoutTest::testRegionChanges in core/
modules/ field_layout/ tests/ src/ Functional/ FieldLayoutTest.php - Tests that changes to the regions still leave the fields visible.
File
- core/
modules/ field_layout/ tests/ src/ Functional/ FieldLayoutTest.php, line 92
Class
- FieldLayoutTest
- Tests using field layout for entity displays.
Namespace
Drupal\Tests\field_layout\FunctionalCode
protected function getRegionTitles() {
$region_titles = [];
$region_title_elements = $this
->getSession()
->getPage()
->findAll('css', '.region-title td');
/** @var \Behat\Mink\Element\NodeElement[] $region_title_elements */
foreach ($region_title_elements as $region_title_element) {
$region_titles[] = $region_title_element
->getText();
}
return $region_titles;
}