function ThemeInstallerTest::testUninstallNotInstalled

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php \Drupal\KernelTests\Core\Theme\ThemeInstallerTest::testUninstallNotInstalled()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php \Drupal\KernelTests\Core\Theme\ThemeInstallerTest::testUninstallNotInstalled()
  3. 11.x core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php \Drupal\KernelTests\Core\Theme\ThemeInstallerTest::testUninstallNotInstalled()

Tests uninstalling a theme that is not installed.

File

core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php, line 396

Class

ThemeInstallerTest
Tests installing and uninstalling of themes.

Namespace

Drupal\KernelTests\Core\Theme

Code

public function testUninstallNotInstalled() : void {
    $name = 'test_basetheme';
    $themes = $this->themeHandler()
        ->listInfo();
    $this->assertEmpty(array_keys($themes));
    $this->expectException(UnknownExtensionException::class);
    $this->themeInstaller()
        ->uninstall([
        $name,
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.