You are here

protected function ThemeUiTest::uninstallTheme in Drupal 9

Same name and namespace in other branches
  1. 8 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 199

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.");
}