function ConfigTranslationListUiTest::setUp
Overrides BrowserTestBase::setUp
File
- 
              core/modules/ contact/ tests/ src/ Functional/ ConfigTranslationListUiTest.php, line 46 
Class
- ConfigTranslationListUiTest
- Ensure the "translate" link is added to contact forms.
Namespace
Drupal\Tests\contact\FunctionalCode
protected function setUp() : void {
  parent::setUp();
  $permissions = [
    'access site-wide contact form',
    'administer contact forms',
    'translate configuration',
  ];
  // Create and log in user.
  $this->adminUser = $this->drupalCreateUser($permissions);
  $this->drupalLogin($this->adminUser);
  // Enable import of translations. By default this is disabled for automated
  // tests.
  $this->config('locale.settings')
    ->set('translation.import_enabled', TRUE)
    ->set('translation.use_source', LOCALE_TRANSLATION_USE_SOURCE_LOCAL)
    ->save();
  $this->drupalPlaceBlock('local_tasks_block');
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
