public function InstallTest::testUninstallPostUpdateFunctions in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/src/Functional/Module/InstallTest.php \Drupal\Tests\system\Functional\Module\InstallTest::testUninstallPostUpdateFunctions()
- 10 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 67
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);
}