You are here

public function ConfigTranslationListUiTest::doSettingsPageTest in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationListUiTest::doSettingsPageTest()

Tests a given settings page for the translate operation.

Parameters

string $link: URL of the settings page to test.

1 call to ConfigTranslationListUiTest::doSettingsPageTest()
ConfigTranslationListUiTest::testTranslateOperationInListUi in core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php
Tests if translate link is added to operations in all configuration lists.

File

core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php, line 466

Class

ConfigTranslationListUiTest
Visit all lists.

Namespace

Drupal\Tests\config_translation\Functional

Code

public function doSettingsPageTest($link) {

  // Get the settings page.
  $this
    ->drupalGet($link);
  $translate_link = $link . '/translate';

  // Test if the link to translate the settings page is present.
  $this
    ->assertSession()
    ->linkByHrefExists($translate_link);

  // Test if the link to translate actually goes to the translate page.
  $this
    ->drupalGet($translate_link);
  $this
    ->assertSession()
    ->responseContains('<th>Language</th>');
}