public function LocaleTranslationUiTest::testEnglishTranslation in Drupal 9
Same name and namespace in other branches
- 8 core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php \Drupal\Tests\locale\Functional\LocaleTranslationUiTest::testEnglishTranslation()
- 10 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 34
Class
- LocaleTranslationUiTest
- Adds a new locale and translates its name. Checks the validation of translation strings and search results.
Namespace
Drupal\Tests\locale\FunctionalCode
public function testEnglishTranslation() {
$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.');
}