protected function FieldModuleUninstallValidatorTest::assertModuleInstallUninstall in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Field/FieldModuleUninstallValidatorTest.php \Drupal\system\Tests\Field\FieldModuleUninstallValidatorTest::assertModuleInstallUninstall()
Asserts the given module can be installed and uninstalled.
Parameters
string $module_name: The module to install and uninstall.
1 call to FieldModuleUninstallValidatorTest::assertModuleInstallUninstall()
- FieldModuleUninstallValidatorTest::testUninstallingModule in core/
modules/ system/ src/ Tests/ Field/ FieldModuleUninstallValidatorTest.php - Tests uninstall entity_test module with and without content for the field.
File
- core/
modules/ system/ src/ Tests/ Field/ FieldModuleUninstallValidatorTest.php, line 115 - Contains \Drupal\system\Tests\Field\FieldModuleUninstallValidatorTest.
Class
- FieldModuleUninstallValidatorTest
- Tests FieldModuleUninstallValidator functionality.
Namespace
Drupal\system\Tests\FieldCode
protected function assertModuleInstallUninstall($module_name) {
$this
->enableModules([
$module_name,
]);
$this->entityDefinitionUpdateManager
->applyUpdates();
$this
->assertTrue($this
->getModuleHandler()
->moduleExists($module_name), $module_name . ' module is enabled.');
$this
->getModuleInstaller()
->uninstall([
$module_name,
]);
$this->entityDefinitionUpdateManager
->applyUpdates();
$this
->assertFalse($this
->getModuleHandler()
->moduleExists($module_name), $module_name . ' module is disabled.');
}