CommentTestTrait
trait CommentTestTrait (View source)
Provides common functionality for the Comment test classes.
Methods
addDefaultCommentField(string $entity_type, string $bundle, string $field_name = 'comment', int $default_value = CommentItemInterface::OPEN, string $comment_type_id = 'comment', string $comment_view_mode = 'full')
Adds the default comment field to an entity.
Details
addDefaultCommentField(string $entity_type, string $bundle, string $field_name = 'comment', int $default_value = CommentItemInterface::OPEN, string $comment_type_id = 'comment', string $comment_view_mode = 'full')
Adds the default comment field to an entity.
Attaches a comment field named 'comment' to the given entity type and bundle. Largely replicates the default behavior in Drupal 7 and earlier.