'status' => CommentInterface::PUBLISHED,
'subject' =>
$this->
randomMachineName(),
'hostname' => '127.0.0.1',
'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
'comment_body' =>
[['value' =>
$this->
randomMachineName()]],
]);
$comment->
save();
$this->comment =
$comment;
// Tests that reply link is not visible when threading is disabled.
$this->
drupalLogin($this->webUser
);
$this->
setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_FLAT, 'Comment paging changed.'
);
$this->
drupalGet('node/' .
$this->node->
id());
$this->
assertSession()->
linkNotExists('Reply'
);
// Tests that reply link is visible when threading is enabled.
$this->
setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_THREADED, 'Comment paging changed.'
);
$this->
drupalGet('node/' .
$this->node->
id());
$this->
assertSession()->
linkExists('Reply'
);
// Change comment settings.
$this->
setCommentSettings('form_location', CommentItemInterface::FORM_BELOW, 'Set comment form location'
);
$this->node->comment = CommentItemInterface::OPEN;
$this->node->
save();