function ThemeUiTest::uninstallTheme

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php \Drupal\Tests\system\Functional\Theme\ThemeUiTest::uninstallTheme()
  2. 8.9.x core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php \Drupal\Tests\system\Functional\Theme\ThemeUiTest::uninstallTheme()
  3. 11.x core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php \Drupal\Tests\system\Functional\Theme\ThemeUiTest::uninstallTheme()

Uninstalls a theme via the admin UI.

Parameters

string $theme_name: The theme name.

2 calls to ThemeUiTest::uninstallTheme()
ThemeUiTest::testInstalledIncompatibleTheme in core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php
Tests that incompatible themes message is shown.
ThemeUiTest::testThemeInstallWithModuleDependencies in core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php
Tests installing a theme with module dependencies.

File

core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php, line 203

Class

ThemeUiTest
Tests the theme UI.

Namespace

Drupal\Tests\system\Functional\Theme

Code

protected function uninstallTheme($theme_name) {
    $this->drupalGet('admin/appearance');
    $this->clickLink("Uninstall {$theme_name} theme");
    $this->assertSession()
        ->pageTextContains("The {$theme_name} theme has been uninstalled.");
}

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