function LocaleTranslationUiTest::testEnglishTranslation
Same name in other branches
- 9 core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php \Drupal\Tests\locale\Functional\LocaleTranslationUiTest::testEnglishTranslation()
- 8.9.x core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php \Drupal\Tests\locale\Functional\LocaleTranslationUiTest::testEnglishTranslation()
- 11.x core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php \Drupal\Tests\locale\Functional\LocaleTranslationUiTest::testEnglishTranslation()
Enable interface translation to English.
File
-
core/
modules/ locale/ tests/ src/ Functional/ LocaleTranslationUiTest.php, line 40
Class
- LocaleTranslationUiTest
- Tests the validation of translation strings and search results.
Namespace
Drupal\Tests\locale\FunctionalCode
public function testEnglishTranslation() : void {
$admin_user = $this->drupalCreateUser([
'administer languages',
'access administration pages',
]);
$this->drupalLogin($admin_user);
$this->drupalGet('admin/config/regional/language/edit/en');
$this->submitForm([
'locale_translate_english' => TRUE,
], 'Save language');
$this->assertSession()
->linkByHrefExists('/admin/config/regional/translate?langcode=en', 0, 'Enabled interface translation to English.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.