function ThemeUninstallConfirmTest::testInvalidThemeName

Same name and namespace in other branches
  1. main core/modules/system/tests/src/Functional/Theme/ThemeUninstallConfirmTest.php \Drupal\Tests\system\Functional\Theme\ThemeUninstallConfirmTest::testInvalidThemeName()

Tests handling of invalid theme name.

File

core/modules/system/tests/src/Functional/Theme/ThemeUninstallConfirmTest.php, line 143

Class

ThemeUninstallConfirmTest
Tests the theme uninstall confirmation form.

Namespace

Drupal\Tests\system\Functional\Theme

Code

public function testInvalidThemeName() : void {
  $this->drupalGet('admin/appearance/uninstall', [
    'query' => [
      'theme' => 'nonexistent',
    ],
  ]);
  $this->assertSession()
    ->addressEquals('admin/appearance');
  $this->assertSession()
    ->pageTextContains('The nonexistent theme was not found');
}

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