Index: tests/taxonomy.php
===================================================================
--- tests/taxonomy.php	(revision 31694)
+++ tests/taxonomy.php	(working copy)
@@ -389,4 +389,87 @@
 		$this->assertEqualSets( array( $t1 ), get_ancestors( $t2, 'wptests_conflict' ) );
 		_unregister_post_type( 'wptests_pt' );
 	}
+
+	/**
+	 * @ticket 26475
+	 */
+	public function test_wp_terms_checklist() {
+		register_taxonomy( 'wptests_tax', 'post', array(
+			'hierarchical' => true,
+		) );
+
+		$t1 = $this->factory->term->create( array(
+			'taxonomy' => 'wptests_tax',
+		) );
+
+		$t2 = $this->factory->term->create( array(
+			'taxonomy' => 'wptests_tax',
+			'parent' => $t1
+		) );
+
+		$p1 = $this->factory->post->create( array(
+			'post_type' => 'post',
+		) );
+
+		wp_set_post_terms($p1, array($t1, $t2), 'wptests_tax');
+
+		$html = trim(get_echo('wp_terms_checklist', array($p1, array(
+			'taxonomy' => 'wptests_tax', 
+			'descendants_and_self' => $t1, 
+			'selected_cats' => array($t1, $t2), 
+			'popular_cats' => array()
+		))));
+
+		$expected = '<li id=\'wptests_tax-2\'><label class="selectit"><input value="2" type="checkbox" name="tax_input[wptests_tax][]" id="in-wptests_tax-2" checked=\'checked\' disabled=\'disabled\' /> Term 1</label><ul class=\'children\'>
+
+<li id=\'wptests_tax-3\'><label class="selectit"><input value="3" type="checkbox" name="tax_input[wptests_tax][]" id="in-wptests_tax-3" checked=\'checked\' disabled=\'disabled\' /> Term 2</label></li>
+</ul>
+</li>';
+
+		// both the parent and child terms set to the post
+		$this->assertEquals( $expected, $html );
+
+		wp_remove_object_terms($p1, array($t1), 'wptests_tax');
+
+		$html = trim(get_echo('wp_terms_checklist', array($p1, array(
+			'taxonomy' => 'wptests_tax', 
+			'descendants_and_self' => $t2, 
+			'selected_cats' => array($t2), 
+			'popular_cats' => array()
+		))));
+
+		$expected = '<li id=\'wptests_tax-2\'><label class="selectit"><input value="2" type="checkbox" name="tax_input[wptests_tax][]" id="in-wptests_tax-2" disabled=\'disabled\' /> Term 1</label><ul class=\'children\'>
+
+<li id=\'wptests_tax-3\'><label class="selectit"><input value="3" type="checkbox" name="tax_input[wptests_tax][]" id="in-wptests_tax-3" checked=\'checked\' disabled=\'disabled\' /> Term 2</label></li>
+</ul>
+</li>';
+
+		// the parent term was removed from the post
+		$this->assertEquals( $expected, $html );
+
+		$t3 = $this->factory->term->create( array(
+			'taxonomy' => 'wptests_tax',
+			'parent' => $t1
+		) );
+
+		wp_set_post_terms($p1, array($t3), 'wptests_tax', true);
+
+		$html = trim(get_echo('wp_terms_checklist', array($p1, array(
+			'taxonomy' => 'wptests_tax', 
+			'descendants_and_self' => $t2, 
+			'selected_cats' => array($t2, $t3), 
+			'popular_cats' => array()
+		))));
+
+		$expected = '<li id=\'wptests_tax-2\'><label class="selectit"><input value="2" type="checkbox" name="tax_input[wptests_tax][]" id="in-wptests_tax-2" disabled=\'disabled\' /> Term 1</label><ul class=\'children\'>
+
+<li id=\'wptests_tax-3\'><label class="selectit"><input value="3" type="checkbox" name="tax_input[wptests_tax][]" id="in-wptests_tax-3" checked=\'checked\' disabled=\'disabled\' /> Term 2</label></li>
+
+<li id=\'wptests_tax-4\'><label class="selectit"><input value="4" type="checkbox" name="tax_input[wptests_tax][]" id="in-wptests_tax-4" checked=\'checked\' disabled=\'disabled\' /> Term 3</label></li>
+</ul>
+</li>';
+		
+		// another child term was added to the same parent and assigned to the post
+		$this->assertEquals( $expected, $html );
+	}
 }
