You are here

protected function TourTestBasic::setUp in Drupal 9

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

Overrides BrowserTestBase::setUp

1 method overrides TourTestBasic::setUp()
TourTest::setUp in core/modules/tour/tests/src/Functional/TourTest.php

File

core/modules/tour/tests/src/Functional/TourTestBasic.php, line 42

Class

TourTestBasic
Simple tour tips test base.

Namespace

Drupal\Tests\tour\Functional

Code

protected function setUp() {
  parent::setUp();

  // Make sure we are using distinct default and administrative themes for
  // the duration of these tests.
  $this->container
    ->get('theme_installer')
    ->install([
    'bartik',
    'seven',
  ]);
  $this
    ->config('system.theme')
    ->set('default', 'bartik')
    ->set('admin', 'seven')
    ->save();
  $this->permissions[] = 'view the administration theme';

  // Create an admin user to view tour tips.
  $this->adminUser = $this
    ->drupalCreateUser($this->permissions);
  $this
    ->drupalLogin($this->adminUser);
}