function ConfigTranslationListUiTest::setUp

Same name in other branches
  1. 8.9.x core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationListUiTest::setUp()
  2. 10 core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationListUiTest::setUp()
  3. 11.x core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationListUiTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php, line 59

Class

ConfigTranslationListUiTest
Visit all lists.

Namespace

Drupal\Tests\config_translation\Functional

Code

protected function setUp() : void {
    parent::setUp();
    $permissions = [
        'access site-wide contact form',
        'administer blocks',
        'administer contact forms',
        'administer content types',
        'administer block_content fields',
        'administer filters',
        'administer menu',
        'administer node fields',
        'administer permissions',
        'administer shortcuts',
        'administer site configuration',
        'administer taxonomy',
        'administer account settings',
        'administer languages',
        'administer image styles',
        'administer responsive images',
        '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.