public function HelpTopicSearchTest::testUninstall in Drupal 9
Same name and namespace in other branches
- 8 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 251
Class
- HelpTopicSearchTest
- Verifies help topic search.
Namespace
Drupal\Tests\help_topics\FunctionalCode
public function testUninstall() {
\Drupal::service('module_installer')
->uninstall([
'help_topics_test',
]);
// Ensure we can uninstall help_topics and use the help system without
// breaking.
$this
->drupalLogin($this->rootUser);
$edit = [];
$edit['uninstall[help_topics]'] = TRUE;
$this
->drupalGet('admin/modules/uninstall');
$this
->submitForm($edit, 'Uninstall');
$this
->submitForm([], 'Uninstall');
$this
->assertSession()
->pageTextContains('The selected modules have been uninstalled.');
$this
->drupalGet('admin/help');
$this
->assertSession()
->statusCodeEquals(200);
}