You are here

protected function InstalledConfigurationTest::setDefaultTheme in Thunder 8.4

Same name and namespace in other branches
  1. 8.5 tests/src/Functional/InstalledConfigurationTest.php \Drupal\Tests\thunder\Functional\InstalledConfigurationTest::setDefaultTheme()
  2. 8.2 tests/src/Functional/InstalledConfigurationTest.php \Drupal\Tests\thunder\Functional\InstalledConfigurationTest::setDefaultTheme()
  3. 8.3 tests/src/Functional/InstalledConfigurationTest.php \Drupal\Tests\thunder\Functional\InstalledConfigurationTest::setDefaultTheme()
  4. 6.2.x tests/src/Functional/InstalledConfigurationTest.php \Drupal\Tests\thunder\Functional\InstalledConfigurationTest::setDefaultTheme()
  5. 6.0.x tests/src/Functional/InstalledConfigurationTest.php \Drupal\Tests\thunder\Functional\InstalledConfigurationTest::setDefaultTheme()
  6. 6.1.x tests/src/Functional/InstalledConfigurationTest.php \Drupal\Tests\thunder\Functional\InstalledConfigurationTest::setDefaultTheme()

Set default theme for test.

Parameters

string $defaultTheme: Default Theme.

1 call to InstalledConfigurationTest::setDefaultTheme()
InstalledConfigurationTest::testInstalledConfiguration in tests/src/Functional/InstalledConfigurationTest.php
Compare active configuration with configuration Yaml files.

File

tests/src/Functional/InstalledConfigurationTest.php, line 297

Class

InstalledConfigurationTest
Test for checking of configuration after install of thunder profile.

Namespace

Drupal\Tests\thunder\Functional

Code

protected function setDefaultTheme($defaultTheme) {
  \Drupal::service('theme_installer')
    ->install([
    $defaultTheme,
  ]);
  $themeConfig = \Drupal::configFactory()
    ->getEditable('system.theme');
  $themeConfig
    ->set('default', $defaultTheme);
  $themeConfig
    ->save();
}