$this->entityTypeId = 'comment';
$this->bundle = 'comment_article';
$this->testLanguageSelector = FALSE;
$this->subject =
$this->
randomMachineName();
parent::
setUp();
} /**
* {@inheritdoc}
*/
public function setupBundle() { parent::
setupBundle();
$this->
drupalCreateContentType(['type' => 'article', 'name' => 'article'
]);
// Add a comment field to the article content type.
$this->
addDefaultCommentField('node', 'article', 'comment_article', CommentItemInterface::OPEN, 'comment_article'
);
// Create a page content type.
$this->
drupalCreateContentType(['type' => 'page', 'name' => 'page'
]);
// Add a comment field to the page content type - this one won't be
// translatable.
$this->
addDefaultCommentField('node', 'page', 'comment'
);
// Mark this bundle as translatable.
$this->container->
get('content_translation.manager'
)->
setEnabled('comment', 'comment_article', TRUE
);
}