function ConfigTranslationUiModulesTest::testMenuTranslationWithoutChange
Same name in other branches
- 10 core/modules/config_translation/tests/src/Functional/ConfigTranslationUiModulesTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationUiModulesTest::testMenuTranslationWithoutChange()
Test translation save confirmation message.
File
-
core/
modules/ config_translation/ tests/ src/ Functional/ ConfigTranslationUiModulesTest.php, line 424
Class
- ConfigTranslationUiModulesTest
- Translate settings and entities to various languages.
Namespace
Drupal\Tests\config_translation\FunctionalCode
public function testMenuTranslationWithoutChange() : void {
$this->drupalLogin($this->adminUser);
$this->drupalGet('admin/structure/menu/manage/main/translate/tyv/add');
$this->submitForm([], 'Save translation');
$this->assertSession()
->pageTextContains('Tuvan translation was not added. To add a translation, you must modify the configuration.');
$this->drupalGet('admin/structure/menu/manage/main/translate/tyv/add');
$edit = [
'translation[config_names][system.menu.main][label]' => 'Main navigation Translation',
'translation[config_names][system.menu.main][description]' => 'Site section links Translation',
];
$this->submitForm($edit, 'Save translation');
$this->assertSession()
->pageTextContains('Successfully saved Tuvan translation.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.