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. 10 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.

1 call to ThemeUiTest::uninstallTheme()
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 195

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.