You are here

protected function TourTestBasic::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/tour/src/Tests/TourTestBasic.php \Drupal\tour\Tests\TourTestBasic::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

1 call to TourTestBasic::setUp()
TourTest::setUp in core/modules/tour/src/Tests/TourTest.php
Sets up a Drupal site for running functional and integration tests.
1 method overrides TourTestBasic::setUp()
TourTest::setUp in core/modules/tour/src/Tests/TourTest.php
Sets up a Drupal site for running functional and integration tests.

File

core/modules/tour/src/Tests/TourTestBasic.php, line 47
Contains \Drupal\tour\Tests\TourTestBasic.

Class

TourTestBasic
Simple tour tips test base.

Namespace

Drupal\tour\Tests

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_handler')
    ->install(array(
    '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);
}