function ConfigTranslationListUiTest::testShortcutListTranslation
Same name and namespace in other branches
- 11.x core/modules/shortcut/tests/src/Functional/ConfigTranslationListUiTest.php \Drupal\Tests\shortcut\Functional\ConfigTranslationListUiTest::testShortcutListTranslation()
Tests the shortcut listing for the translate operation.
File
-
core/
modules/ shortcut/ tests/ src/ Functional/ ConfigTranslationListUiTest.php, line 59
Class
- ConfigTranslationListUiTest
- Ensure the "translate" link is added to shortcut sets.
Namespace
Drupal\Tests\shortcut\FunctionalCode
public function testShortcutListTranslation() : void {
$shortcut = ShortcutSet::create([
'id' => $this->randomMachineName(16),
'label' => $this->randomString(),
]);
$shortcut->save();
$this->drupalGet('admin/config/user-interface/shortcut');
$translate_link = 'admin/config/user-interface/shortcut/manage/' . $shortcut->id() . '/translate';
$this->assertSession()
->linkByHrefExists($translate_link);
$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.