function HelpTopicSearchTest::testUninstall
Same name in other branches
- 9 core/modules/help_topics/tests/src/Functional/HelpTopicSearchTest.php \Drupal\Tests\help_topics\Functional\HelpTopicSearchTest::testUninstall()
- 8.9.x core/modules/help_topics/tests/src/Functional/HelpTopicSearchTest.php \Drupal\Tests\help_topics\Functional\HelpTopicSearchTest::testUninstall()
- 10 core/modules/help/tests/src/Functional/HelpTopicSearchTest.php \Drupal\Tests\help\Functional\HelpTopicSearchTest::testUninstall()
Tests uninstalling the help_topics module.
File
-
core/
modules/ help/ tests/ src/ Functional/ HelpTopicSearchTest.php, line 256
Class
- HelpTopicSearchTest
- Verifies help topic search.
Namespace
Drupal\Tests\help\FunctionalCode
public function testUninstall() : void {
\Drupal::service('module_installer')->uninstall([
'help_topics_test',
]);
// Ensure we can uninstall help_topics and use the help system without
// breaking.
$this->drupalLogin($this->createUser([
'administer modules',
'access help pages',
]));
$edit = [];
$edit['uninstall[help]'] = TRUE;
$this->drupalGet('admin/modules/uninstall');
$this->submitForm($edit, 'Uninstall');
$this->submitForm([], 'Uninstall');
$this->assertSession()
->statusMessageContains('The selected modules have been uninstalled.', 'status');
$this->drupalGet('admin/help');
$this->assertSession()
->statusCodeEquals(404);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.