You are here

public function HelpTopicSearchTest::testUninstall in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/help_topics/tests/src/Functional/HelpTopicSearchTest.php \Drupal\Tests\help_topics\Functional\HelpTopicSearchTest::testUninstall()

Tests uninstalling the help_topics module.

File

core/modules/help_topics/tests/src/Functional/HelpTopicSearchTest.php, line 243

Class

HelpTopicSearchTest
Verifies help topic search.

Namespace

Drupal\Tests\help_topics\Functional

Code

public function testUninstall() {

  // Ensure we can uninstall help_topics and use the help system without
  // breaking.
  $this
    ->drupalLogin($this->rootUser);
  $edit = [];
  $edit['uninstall[help_topics]'] = TRUE;
  $this
    ->drupalPostForm('admin/modules/uninstall', $edit, t('Uninstall'));
  $this
    ->drupalPostForm(NULL, NULL, t('Uninstall'));
  $this
    ->assertText(t('The selected modules have been uninstalled.'), 'Modules status has been updated.');
  $this
    ->drupalGet('admin/help');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}