You are here

protected function TourTestBasic::setUp in Drupal 10

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

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() : void {
  parent::setUp();

  // Make sure we are using distinct default and administrative themes for
  // the duration of these tests.
  $this->container
    ->get('theme_installer')
    ->install([
    'olivero',
    'claro',
  ]);
  $this
    ->config('system.theme')
    ->set('default', 'olivero')
    ->set('admin', 'claro')
    ->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);
}