public function InstallTest::testUninstallPostUpdateFunctions in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/Module/InstallTest.php \Drupal\Tests\system\Functional\Module\InstallTest::testUninstallPostUpdateFunctions()
Ensures that post update functions are removed on uninstall.
File
- core/
modules/ system/ tests/ src/ Functional/ Module/ InstallTest.php, line 69
Class
- InstallTest
- Tests the installation of modules.
Namespace
Drupal\Tests\system\Functional\ModuleCode
public function testUninstallPostUpdateFunctions() {
\Drupal::service('module_installer')
->uninstall([
'module_test',
]);
$post_update_key_value = \Drupal::keyValue('post_update');
$existing_updates = $post_update_key_value
->get('existing_updates', []);
$this
->assertNotContains('module_test_post_update_test', $existing_updates);
}