Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Drupal\comment\Plugin\views\field\LinkApprove
has no test coverage at the moment
Proposed resolution
Add test coverage
Beta phase evaluation
Issue category | Task because we are just adding tests |
---|---|
Issue priority | Normal because we are adding tests for something small that works but just didn't have test coverage. |
Unfrozen changes | Unfrozen because it only adds tests. |
Comment | File | Size | Author |
---|---|---|---|
#22 | test-comment-link-2555899-22.patch | 9.96 KB | geertvd |
#22 | interdiff-2555899-16-22.txt | 1.42 KB | geertvd |
#17 | test-comment-link-2555899-16.patch | 9.94 KB | geertvd |
#17 | interdiff-2555899-14-16.txt | 679 bytes | geertvd |
#14 | test-comment-link-2555899-14.patch | 9.92 KB | geertvd |
Comments
Comment #2
geertvd CreditAttribution: geertvd at XIO commentedComment #6
geertvd CreditAttribution: geertvd at XIO commentedNot really sure why this is not working, no issues locally.
Comment #8
geertvd CreditAttribution: geertvd at XIO commentedNow i feel stupid :)
Comment #10
geertvd CreditAttribution: geertvd at XIO commentedI'm going to include the linkReply handler in this test also.
Comment #11
geertvd CreditAttribution: geertvd at XIO commentedOk, I think this is better.
I added test coverage for
Drupal\comment\Plugin\views\field\LinkReply
.I also added a
CommentKernelTestBase
class since there are some other comment handlers that are still untested, those could extend fromCommentKernelTestBase
.Ideally
CommentUserNameTest
should also extendCommentKernelTestBase
, this can be picked up in a follow-up.Comment #12
geertvd CreditAttribution: geertvd at XIO commentednitpicks
Comment #13
geertvd CreditAttribution: geertvd at XIO commentedComment #14
geertvd CreditAttribution: geertvd at XIO commentedmore nitpicks
Comment #15
dawehnerI'm curious whether you want to try to port over the ViewKernelTestBase to KTBTNG, so for new tests we could use it. This does not belong into this issue, this is for sure.
Nitpick: Let's use
\Drupal\user\UserStorageInterface
Comment #16
geertvd CreditAttribution: geertvd at XIO commentedFixed those last nitpicks in #15, keeping this RTBC since I'm just changing some comments.
15.1: I could look into that, I think we should wait for #2553533: KernelTestBaseTNG™ is not cleaning up after itself to get in though, created a follow-up for that: #2556855: Port ViewKernelTestBase to extend from KernelTestBaseTNG™
Also created a follow-up for #11: #2556863: Make CommentUserNameTest extend from CommentViewKernelTestBase
Added beta evaluation.
Comment #17
geertvd CreditAttribution: geertvd at XIO commentedAnd the patch :)
Comment #20
geertvd CreditAttribution: geertvd at XIO commentedSeems like a random fail, setting back to RTBC
Comment #21
alexpottConmmentKernelTestBase feels like the wrong name since this about testing comment and views functionality - perhaps CommentViewKernelTestBase?
Comment #22
geertvd CreditAttribution: geertvd at XIO commentedFair enough
Comment #23
dawehnerGood point alex
Comment #24
alexpottThank you. Nice - more test coverage of views. Committed d551f8c and pushed to 8.0.x. Thanks!