$comment1_2 =
$this->
postComment(NULL,
$this->
randomMachineName(),
$this->
randomMachineName());
$this->
assertTrue($this->
commentExists($comment1_2, TRUE
), 'Comment #1_2. Reply found.'
);
$this->
assertEquals('01.00/',
$comment1_2->
getThread());
// Test nested threading replying to comment #1_2 creating comment #1_2_3.
$this->
drupalGet('comment/reply/entity_test/' .
$this->entity->
id() . '/comment/' .
$comment1_2->
id());
$comment1_2_3 =
$this->
postComment(NULL,
$this->
randomMachineName(),
$this->
randomMachineName());
$this->
assertTrue($this->
commentExists($comment1_2_3, TRUE
), 'Comment #1_2_3. Reply found.'
);
$this->
assertEquals('01.00.00/',
$comment1_2_3->
getThread());
// Unpublish the comment.
$this->
performCommentOperation($comment1, 'unpublish'
);
$this->
drupalGet('admin/content/comment/approval'
);
$this->
assertSession()->
responseContains('comments[' .
$comment1->
id() . ']'
);
// Publish the comment.
$this->
performCommentOperation($comment1, 'publish', TRUE
);
$this->
drupalGet('admin/content/comment'
);
$this->
assertSession()->
responseContains('comments[' .
$comment1->
id() . ']'
);
// Delete the comment.
$this->
performCommentOperation($comment1, 'delete'
);
$this->
drupalGet('admin/content/comment'
);