function 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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.