public function PhpUninstallTest::testPhpUninstall in PHP 8
Tests if the module cleans up the disk on uninstall.
File
- src/
Tests/ Functional/ PhpUninstallTest.php, line 40
Class
- PhpUninstallTest
- Test uninstall functionality of PHP module.
Namespace
Drupal\Tests\php\FunctionalCode
public function testPhpUninstall() {
// If this request is missing the uninstall form shows "The form has become
// outdated. Copy any unsaved work in the form below and then reload this
// page." message for unknown reasons.
$this
->drupalGet('admin/modules');
// Uninstall the module.
$edit = [];
$edit['uninstall[php]'] = TRUE;
$this
->drupalPostForm('admin/modules/uninstall', $edit, t('Uninstall'));
$this
->assertText(t('Would you like to continue with uninstalling the above?'));
$this
->drupalPostForm(NULL, [], t('Uninstall'));
$this
->assertText(t('The selected modules have been uninstalled.'));
}