protected function NodeTranslationUITest::doTestTranslations in Drupal 10
Same name and namespace in other branches
- 8 core/modules/node/tests/src/Functional/NodeTranslationUITest.php \Drupal\Tests\node\Functional\NodeTranslationUITest::doTestTranslations()
- 9 core/modules/node/tests/src/Functional/NodeTranslationUITest.php \Drupal\Tests\node\Functional\NodeTranslationUITest::doTestTranslations()
Tests that the given path displays the correct translation values.
Parameters
string $path: The path to be tested.
array $values: The translation values to be found.
File
- core/
modules/ node/ tests/ src/ Functional/ NodeTranslationUITest.php, line 402
Class
- NodeTranslationUITest
- Tests the Node Translation UI.
Namespace
Drupal\Tests\node\FunctionalCode
protected function doTestTranslations($path, array $values) {
$languages = $this->container
->get('language_manager')
->getLanguages();
foreach ($this->langcodes as $langcode) {
$this
->drupalGet($path, [
'language' => $languages[$langcode],
]);
$this
->assertSession()
->pageTextContains($values[$langcode]['title'][0]['value']);
}
}