You are here

public function ClassyTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Kernel/Render/ClassyTest.php \Drupal\Tests\system\Kernel\Render\ClassyTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/system/tests/src/Kernel/Render/ClassyTest.php, line 22

Class

ClassyTest
Tests the Classy theme.

Namespace

Drupal\Tests\system\Kernel\Render

Code

public function setUp() : void {
  parent::setUp();

  // Use the classy theme.
  $this->container
    ->get('theme_installer')
    ->install([
    'classy',
  ]);
  $this->container
    ->get('config.factory')
    ->getEditable('system.theme')
    ->set('default', 'classy')
    ->save();

  // Clear the theme registry.
  $this->container
    ->set('theme.registry', NULL);
}