function LocaleTranslationTest::testEnglishTranslation

Enable interface translation to English

File

drupal/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationTest.php, line 36
Definition of Drupal\locale\Tests\LocaleTranslationTest.

Class

LocaleTranslationTest
Functional test for string translation and validation.

Namespace

Drupal\locale\Tests

Code

function testEnglishTranslation() {
  $admin_user = $this
    ->drupalCreateUser(array(
    'administer languages',
    'access administration pages',
  ));
  $this
    ->drupalLogin($admin_user);
  $this
    ->drupalPost('admin/config/regional/language/edit/en', array(
    'locale_translate_english' => TRUE,
  ), t('Save language'));
  $this
    ->assertLinkByHref('/admin/config/regional/translate/translate?langcode=en', 0, t('Enabled interface translation to English.'));
}