function ConfigTranslationListUiTest::doUserRoleListTest
Same name in other branches
- 9 core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationListUiTest::doUserRoleListTest()
- 8.9.x core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationListUiTest::doUserRoleListTest()
- 11.x core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationListUiTest::doUserRoleListTest()
Tests the role listing for the translate operation.
1 call to ConfigTranslationListUiTest::doUserRoleListTest()
- 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 323
Class
- ConfigTranslationListUiTest
- Visit all lists.
Namespace
Drupal\Tests\config_translation\FunctionalCode
public function doUserRoleListTest() {
// Create a test role to decouple looking for translate operations
// link so this does not test more than necessary.
$role_id = $this->randomMachineName(16);
$this->drupalCreateRole([], $role_id);
// Get the role listing.
$this->drupalGet('admin/people/roles');
$translate_link = 'admin/people/roles/manage/' . $role_id . '/translate';
// Test if the link to translate the role is on the page.
$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>');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.