function OliveroTest::testIsUninstallable

Same name in other branches
  1. 9 core/tests/Drupal/FunctionalTests/Theme/OliveroTest.php \Drupal\FunctionalTests\Theme\OliveroTest::testIsUninstallable()
  2. 11.x core/tests/Drupal/FunctionalTests/Theme/OliveroTest.php \Drupal\FunctionalTests\Theme\OliveroTest::testIsUninstallable()

Tests that the Olivero theme can be uninstalled.

File

core/tests/Drupal/FunctionalTests/Theme/OliveroTest.php, line 125

Class

OliveroTest
Tests the Olivero theme.

Namespace

Drupal\FunctionalTests\Theme

Code

public function testIsUninstallable() : void {
    $this->drupalLogin($this->drupalCreateUser([
        'access administration pages',
        'administer themes',
    ]));
    $this->drupalGet('admin/appearance');
    $this->cssSelect('a[title="Install <strong>Test theme</strong> as default theme"]')[0]
        ->click();
    $this->cssSelect('a[title="Uninstall Olivero theme"]')[0]
        ->click();
    $this->assertSession()
        ->pageTextContains('The Olivero theme has been uninstalled.');
}

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