function DevelStateEditorTest::assertElementsTextEquals

Same name in other branches
  1. 5.x tests/src/Functional/DevelStateEditorTest.php \Drupal\Tests\devel\Functional\DevelStateEditorTest::assertElementsTextEquals()

Checks that the passed in elements have the expected text.

Parameters

\Behat\Mink\Element\NodeElement[] $elements: The elements for which check the text.

array $expected_elements_text: The expected text for the passed in elements.

1 call to DevelStateEditorTest::assertElementsTextEquals()
DevelStateEditorTest::testStateListing in tests/src/Functional/DevelStateEditorTest.php
Tests state listing.

File

tests/src/Functional/DevelStateEditorTest.php, line 177

Class

DevelStateEditorTest
Tests devel state editor.

Namespace

Drupal\Tests\devel\Functional

Code

protected function assertElementsTextEquals(array $elements, array $expected_elements_text) {
    $actual_text = array_map(function (NodeElement $element) {
        return $element->getText();
    }, $elements);
    $this->assertSame($expected_elements_text, $actual_text);
}