You are here

protected function TmgmtTestTrait::assertTextByXpath in Translation Management Tool 8

Asserts text in the page with an xpath expression.

Parameters

string $xpath: The XPath expression.

string $text: The text to compare.

1 call to TmgmtTestTrait::assertTextByXpath()
ContentEntitySourceContentModerationTest::testModeratedContentTranslations in sources/content/tests/src/Functional/ContentEntitySourceContentModerationTest.php
Test the content moderation workflow with translatable nodes.

File

tests/src/Functional/TmgmtTestTrait.php, line 201

Class

TmgmtTestTrait
Base class for tests.

Namespace

Drupal\Tests\tmgmt\Functional

Code

protected function assertTextByXpath($xpath, $text) {
  $this
    ->assertEqual((string) $this
    ->xpath($xpath)[0]
    ->getText(), $text);
}