public function EntityUpdateInstallUninstallTest::testEntityUpdateUninstall in Entity Update 8
Tests if the module cleans up the disk on uninstall.
File
- modules/
entity_update_tests/ src/ Tests/ EntityUpdateInstallUninstallTest.php, line 40
Class
- EntityUpdateInstallUninstallTest
- Test install and uninstall Entity Update module.
Namespace
Drupal\entity_update_tests\TestsCode
public function testEntityUpdateUninstall() {
// Uninstall the module entity_update_tests.
$edit = [];
$edit['uninstall[entity_update_tests]'] = TRUE;
$this
->drupalPostForm('admin/modules/uninstall', $edit, t('Uninstall'));
$this
->assertText(\Drupal::translation()
->translate('Configuration deletions'), 'Configuration deletions listed on the module install confirmation page.');
$this
->drupalPostForm(NULL, NULL, t('Uninstall'));
$this
->assertText(t('The selected modules have been uninstalled.'), 'Modules status has been updated.');
// Uninstall the module entity_update.
$edit = [];
$edit['uninstall[entity_update]'] = TRUE;
$this
->drupalPostForm('admin/modules/uninstall', $edit, t('Uninstall'));
$this
->assertNoText(\Drupal::translation()
->translate('Configuration deletions'), 'No configuration deletions listed on the module install confirmation page.');
$this
->drupalPostForm(NULL, NULL, t('Uninstall'));
$this
->assertText(t('The selected modules have been uninstalled.'), 'Modules status has been updated.');
}