You are here

protected function ConfigTranslationUiThemeTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationUiThemeTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php, line 44

Class

ConfigTranslationUiThemeTest
Verifies theme configuration translation settings.

Namespace

Drupal\Tests\config_translation\Functional

Code

protected function setUp() : void {
  parent::setUp();
  $admin_permissions = [
    'administer themes',
    'administer languages',
    'administer site configuration',
    'translate configuration',
  ];

  // Create and log in user.
  $this->adminUser = $this
    ->drupalCreateUser($admin_permissions);

  // Add languages.
  foreach ($this->langcodes as $langcode) {
    ConfigurableLanguage::createFromLangcode($langcode)
      ->save();
  }
}