You are here

protected function ThemeNotUsingClassyLibraryTest::setUp in Drupal 8

Overrides KernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Theme/ThemeNotUsingClassyLibraryTest.php, line 63

Class

ThemeNotUsingClassyLibraryTest
Tests that themes do not depend on Classy libraries.

Namespace

Drupal\KernelTests\Core\Theme

Code

protected function setUp() {
  parent::setUp();
  $this->themeInitialization = $this->container
    ->get('theme.initialization');
  $this->libraryDiscovery = $this->container
    ->get('library.discovery');
  $this->themeHandler = $this->container
    ->get('theme_handler');
  $this->container
    ->get('theme_installer')
    ->install([
    'umami',
    'bartik',
    'seven',
    'claro',
  ]);
  $this->classyLibraries = $this->libraryDiscovery
    ->getLibrariesByExtension('classy');
  $this
    ->assertNotEmpty($this->classyLibraries);
  $this->classyLibrariesExtend = $this->themeHandler
    ->getTheme('classy')->info['libraries-extend'];
  $this
    ->assertNotEmpty($this->classyLibrariesExtend);
}