function ConfigTranslationInstallTest::testConfigTranslation

Same name and namespace in other branches
  1. 11.x core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationInstallTest::testConfigTranslation()
  2. 10 core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationInstallTest::testConfigTranslation()
  3. 9 core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationInstallTest::testConfigTranslation()

File

core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php, line 62

Class

ConfigTranslationInstallTest
Installs the config translation module on a site installed in non english.

Namespace

Drupal\Tests\config_translation\Functional

Code

public function testConfigTranslation() {
  $this->drupalPostForm('admin/config/regional/language/add', [
    'predefined_langcode' => 'en',
  ], t('Add custom language'));
  $this->drupalPostForm('admin/config/regional/language/add', [
    'predefined_langcode' => 'fr',
  ], t('Add custom language'));
  $edit = [
    'modules[config_translation][enable]' => TRUE,
  ];
  $this->drupalPostForm('admin/modules', $edit, t('Install'));
  $this->drupalGet('/admin/structure/types/manage/article/fields');
  $this->assertSession()
    ->statusCodeEquals(200);
}

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