@@ -1893,47 +1893,4 @@ public function test_wp_trash_comment_only_top_level_notes_trigger_child_deletio
18931893 // Verify the sibling note is NOT trashed (no cascade since child is not top-level).
18941894 $ this ->assertSame ( '1 ' , get_comment ( $ sibling_note )->comment_approved );
18951895 }
1896-
1897- /**
1898- * Test that all descendants including grandchildren are trashed when
1899- * a parent note is trashed. Note that grandchildren are not currently
1900- * possible, but the code should support them.
1901- */
1902- public function test_wp_trash_comment_trashes_all_descendants_including_grandchildren () {
1903- // Create a parent note.
1904- $ parent_note = self ::factory ()->comment ->create (
1905- array (
1906- 'comment_post_ID ' => self ::$ post_id ,
1907- 'comment_type ' => 'note ' ,
1908- 'comment_parent ' => 0 ,
1909- 'comment_approved ' => '1 ' ,
1910- )
1911- );
1912- // Create a child note.
1913- $ child_note = self ::factory ()->comment ->create (
1914- array (
1915- 'comment_post_ID ' => self ::$ post_id ,
1916- 'comment_type ' => 'note ' ,
1917- 'comment_parent ' => $ parent_note ,
1918- 'comment_approved ' => '1 ' ,
1919- )
1920- );
1921- // Create a grandchild note.
1922- $ grandchild_note = self ::factory ()->comment ->create (
1923- array (
1924- 'comment_post_ID ' => self ::$ post_id ,
1925- 'comment_type ' => 'note ' ,
1926- 'comment_parent ' => $ child_note ,
1927- 'comment_approved ' => '1 ' ,
1928- )
1929- );
1930-
1931- // Trash the parent note.
1932- wp_trash_comment ( $ parent_note );
1933-
1934- // Verify that all notes are trashed.
1935- $ this ->assertSame ( 'trash ' , get_comment ( $ parent_note )->comment_approved );
1936- $ this ->assertSame ( 'trash ' , get_comment ( $ child_note )->comment_approved );
1937- $ this ->assertSame ( 'trash ' , get_comment ( $ grandchild_note )->comment_approved );
1938- }
19391896}
0 commit comments