diff --git a/core/modules/taxonomy/src/Tests/TermTest.php b/core/modules/taxonomy/src/Tests/TermTest.php
index 7165722..26b7071 100644
--- a/core/modules/taxonomy/src/Tests/TermTest.php
+++ b/core/modules/taxonomy/src/Tests/TermTest.php
@@ -116,6 +116,16 @@ function testTaxonomyTermHierarchy() {
     $term2->save();
     $parents = $taxonomy_storage->loadParents($term2->id());
     $this->assertTrue(isset($parents[$term1->id()]) && isset($parents[$term3->id()]), 'Both parents found successfully.');
+
+    // Delete term 3 from the term edit page.
+    $this->drupalGet('taxonomy/term/' . $term3->id() . '/edit');
+    $this->clickLink(t('Delete'));
+    $this->drupalPostForm(NULL, NULL, t('Delete'));
+
+    // Check the hierarchy after deleting one parent of multiple parents.
+    $taxonomy_storage->resetCache();
+    $parents = $taxonomy_storage->loadTree($this->vocabulary->id(), $term3->id());
+    $this->assertTrue(count($parents) == 0, 'Term 3 has no lineage.');
   }
 
   /**
