Update CommentTestBase::setCommentPreview to use CommentPreview enum

Created on 14 April 2025, 13 days ago

Problem/Motivation

Follow-up to 📌 Each class using DRUPAL_* constants from system.module should define its own constants Needs work

We will have an enum for CommentPreview states which can be used in CommentTestBase::setCommentPreview

Proposed resolution

Not sure if we need to maintain BC on core test bases? Ideally not.

- Update $mode param to take CommentPreview
- Update switch statement to a match
- Pass $mode->value into setCommentSettings

Remaining tasks

Do it

API changes

CommentTestBase::setCommentPreview now takes a CommentPreview object instead of int for $mode

Release notes snippet

📌 Task
Status

Postponed

Version

11.0 🔥

Component

comment.module

Created by

🇦🇺Australia acbramley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024