diff -u b/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php --- b/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php @@ -349,10 +349,6 @@ // Ensure that there are storage definitions from the entity_test module. $this->assertNotEqual($entity_type_id_count, 0, 'There are storage definitions provided by the entity_test module in the schema.'); - // Manually drop one of the test entity type tables to simulate a scenario - // where a table was not created or an entity type is new. - \Drupal::database()->schema()->dropTable('entity_test'); - // Uninstall the entity_test module. $this->container->get('module_installer')->uninstall(['entity_test']); @@ -449,2 +445,12 @@ + /** + * Manually drop one of the test entity type tables to simulate a scenario + * where a table was not created or an entity type is new. + */ + public function testUninstall() { + $this->installModule('entity_test'); + \Drupal::database()->schema()->dropTable('entity_test'); + // Uninstall the entity_test module. + $this->container->get('module_installer')->uninstall(['entity_test']); + } }