You are here

protected function ConfigTranslationListUiTest::setUp in Zircon Profile 8.0

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

Sets up a Drupal site for running functional and integration tests.

Installs Drupal with the installation profile specified in \Drupal\simpletest\WebTestBase::$profile into the prefixed database.

Afterwards, installs any additional modules specified in the static \Drupal\simpletest\WebTestBase::$modules property of each class in the class hierarchy.

After installation all caches are flushed and several configuration values are reset to the values of the parent site executing the test, since the default values may be incompatible with the environment in which tests are being executed.

Overrides WebTestBase::setUp

File

core/modules/config_translation/src/Tests/ConfigTranslationListUiTest.php, line 51
Contains \Drupal\config_translation\Tests\ConfigTranslationListUiTest.

Class

ConfigTranslationListUiTest
Visit all lists.

Namespace

Drupal\config_translation\Tests

Code

protected function setUp() {
  parent::setUp();
  $permissions = array(
    '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)
    ->save();
  $this
    ->drupalPlaceBlock('local_tasks_block');
}