You are here

protected function ThemeSettingsTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php \Drupal\KernelTests\Core\Theme\ThemeSettingsTest::setUp()

Overrides KernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php, line 30

Class

ThemeSettingsTest
Tests theme settings functionality.

Namespace

Drupal\KernelTests\Core\Theme

Code

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

  // Theme settings rely on System module's system.theme.global configuration.
  $this
    ->installConfig([
    'system',
  ]);
  if (!isset($this->availableThemes)) {
    $discovery = new ExtensionDiscovery($this->root);
    $this->availableThemes = $discovery
      ->scan('theme');
  }
}