function ClaroTest::testIsUninstallable

Same name in other branches
  1. 9 core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php \Drupal\FunctionalTests\Theme\ClaroTest::testIsUninstallable()
  2. 8.9.x core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php \Drupal\FunctionalTests\Theme\ClaroTest::testIsUninstallable()
  3. 10 core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php \Drupal\FunctionalTests\Theme\ClaroTest::testIsUninstallable()

Tests that the Claro theme can be uninstalled.

File

core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php, line 69

Class

ClaroTest
Tests the Claro 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 Claro theme"]')[0]
        ->click();
    $this->assertSession()
        ->pageTextContains('The Claro theme has been uninstalled.');
}

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