You are here

public function ThemeHandlerLegacyTest::testInstallUninstall in Drupal 8

@covers ::install @covers ::uninstall @expectedDeprecation \Drupal\Core\Extension\ThemeHandlerInterface::install() is deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Extension\ThemeInstallerInterface::install() instead. See https://www.drupal.org/node/3017233 @expectedDeprecation \Drupal\Core\Extension\ThemeHandlerInterface::uninstall() is deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Extension\ThemeInstallerInterface::uninstall() instead. See https://www.drupal.org/node/3017233

File

core/tests/Drupal/KernelTests/Core/Theme/ThemeHandlerLegacyTest.php, line 36

Class

ThemeHandlerLegacyTest
Tests deprecated methods of ThemeHandler.

Namespace

Drupal\KernelTests\Core\Theme

Code

public function testInstallUninstall() {
  $theme = 'seven';
  $this
    ->assertFalse($this->themeHandler
    ->themeExists($theme));
  $this
    ->assertEquals(TRUE, $this->themeHandler
    ->install([
    $theme,
  ]));
  $this
    ->assertTrue($this->themeHandler
    ->themeExists($theme));
  $this->themeHandler
    ->uninstall([
    $theme,
  ]);
  $this
    ->assertFalse($this->themeHandler
    ->themeExists($theme));
}