function LocaleTranslationUiTest::testEnglishTranslation

Same name in other branches
  1. 8.9.x core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php \Drupal\Tests\locale\Functional\LocaleTranslationUiTest::testEnglishTranslation()
  2. 10 core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php \Drupal\Tests\locale\Functional\LocaleTranslationUiTest::testEnglishTranslation()
  3. 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 33

Class

LocaleTranslationUiTest
Tests the validation of translation strings and search results.

Namespace

Drupal\Tests\locale\Functional

Code

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.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.