You are here

protected function FieldLayoutTest::getRegionTitles in Drupal 8

Same name in this branch
  1. 8 core/modules/field_layout/tests/src/Functional/FieldLayoutTest.php \Drupal\Tests\field_layout\Functional\FieldLayoutTest::getRegionTitles()
  2. 8 core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php \Drupal\Tests\field_layout\FunctionalJavascript\FieldLayoutTest::getRegionTitles()
Same name and namespace in other branches
  1. 9 core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php \Drupal\Tests\field_layout\FunctionalJavascript\FieldLayoutTest::getRegionTitles()

Gets the region titles on the page.

Return value

string[] An array of region titles.

2 calls to FieldLayoutTest::getRegionTitles()
FieldLayoutTest::testEntityForm in core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php
Tests the use of field layout for entity form displays.
FieldLayoutTest::testEntityView in core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php
Tests the use of field layout for entity view displays.

File

core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php, line 292

Class

FieldLayoutTest
Tests using field layout for entity displays.

Namespace

Drupal\Tests\field_layout\FunctionalJavascript

Code

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;
}