You are here

function ThemeInstallerTest::testUninstallSubTheme in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Extension/ThemeInstallerTest.php \Drupal\system\Tests\Extension\ThemeInstallerTest::testUninstallSubTheme()

Tests uninstalling a sub-theme.

File

core/modules/system/src/Tests/Extension/ThemeInstallerTest.php, line 200
Contains \Drupal\system\Tests\Extension\ThemeInstallerTest.

Class

ThemeInstallerTest
Tests installing and uninstalling of themes.

Namespace

Drupal\system\Tests\Extension

Code

function testUninstallSubTheme() {
  $name = 'test_subtheme';
  $base_name = 'test_basetheme';
  $this
    ->themeInstaller()
    ->install(array(
    $name,
  ));
  $this
    ->themeInstaller()
    ->uninstall(array(
    $name,
  ));
  $themes = $this
    ->themeHandler()
    ->listInfo();
  $this
    ->assertFalse(isset($themes[$name]));
  $this
    ->assertTrue(isset($themes[$base_name]));
}