Skip to content

Commit 85e04ee

Browse files
remove test_wp_delete_comment_deletes_descendants_when_empty_trash_days_is_zero
1 parent 5e30cb3 commit 85e04ee

File tree

1 file changed

+0
-58
lines changed

1 file changed

+0
-58
lines changed

tests/phpunit/tests/comment.php

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,64 +1894,6 @@ public function test_wp_trash_comment_only_top_level_notes_trigger_child_deletio
18941894
$this->assertSame( '1', get_comment( $sibling_note )->comment_approved );
18951895
}
18961896

1897-
/**
1898-
* Test wp_trash_comment deletes a note and it's descendants when EMPTY_TRASH_DAYS is set to 0.
1899-
*
1900-
* @runInSeparateProcess
1901-
* @preserveGlobalState disabled
1902-
*/
1903-
public function test_wp_delete_comment_deletes_descendants_when_empty_trash_days_is_zero() {
1904-
// Set EMPTY_TRASH_DAYS to 0 to disable trashing.
1905-
define( 'EMPTY_TRASH_DAYS', 0 );
1906-
$parent_note = self::factory()->comment->create(
1907-
array(
1908-
'comment_post_ID' => self::$post_id,
1909-
'comment_type' => 'note',
1910-
'comment_parent' => 0,
1911-
'comment_approved' => '1',
1912-
)
1913-
);
1914-
1915-
// Create child notes under the parent.
1916-
$child_note_1 = self::factory()->comment->create(
1917-
array(
1918-
'comment_post_ID' => self::$post_id,
1919-
'comment_type' => 'note',
1920-
'comment_parent' => $parent_note,
1921-
'comment_approved' => '1',
1922-
)
1923-
);
1924-
1925-
$child_note_2 = self::factory()->comment->create(
1926-
array(
1927-
'comment_post_ID' => self::$post_id,
1928-
'comment_type' => 'note',
1929-
'comment_parent' => $parent_note,
1930-
'comment_approved' => '1',
1931-
)
1932-
);
1933-
1934-
$child_note_3 = self::factory()->comment->create(
1935-
array(
1936-
'comment_post_ID' => self::$post_id,
1937-
'comment_type' => 'note',
1938-
'comment_parent' => $parent_note,
1939-
'comment_approved' => $approved_status,
1940-
)
1941-
);
1942-
1943-
// Trash the parent note.
1944-
wp_trash_comment( $parent_note );
1945-
1946-
// Verify that the parent note is actually deleted.
1947-
$this->assertNull( get_comment( $parent_note ) );
1948-
1949-
// Verify that the child notes have also been deleted.
1950-
$this->assertNull( get_comment( $child_note_1 ) );
1951-
$this->assertNull( get_comment( $child_note_2 ) );
1952-
$this->assertNull( get_comment( $child_note_3 ) );
1953-
}
1954-
19551897
/**
19561898
* Test that all descendants including grandchildren are trashed when
19571899
* a parent note is trashed. Note that grandchildren are not currently

0 commit comments

Comments
 (0)