Closed (fixed)
Project:
Private content
Version:
8.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Feb 2018 at 09:25 UTC
Updated:
10 Apr 2026 at 11:50 UTC
Jump to comment: Most recent
Comments
Comment #2
adamps commentedComment #3
adamps commentedFixed in #3074618: Fix tests
Comment #4
adamps commentedActually this issue is different. The other issue got the existing tests working. This issue is to make better tests for the security bugs that were present in 1.x.
Comment #7
batigolixWith the help of AI I expanded the unit tests, which now pass in the Gitlab Pipeline.
Please review
Comment #8
batigolixComment #9
arjenk commentedNice to see such a big addition in unittests, some random thoughts;
Comment #10
batigolixThis feedback has been addressed:
- setUp() is public instead of protected in 5 files (PrivateContentTestBase, PrivateUnpublishedTest, PrivateFieldPermissionTest, PrivateComputedFieldTest, PrivateContentTypeTest). PHPUnit/Drupal requires protected.
- 3 test classes bypass the base class - PrivateUnpublishedTest, PrivateFieldPermissionTest, and PrivateComputedFieldTest extend BrowserTestBase directly and duplicate the exact setUp() from PrivateContentTestBase. They should extend PrivateContentTestBase instead.
- "// AI generated.", do we need this?
Please make a new issue for: "i suggest adding tests for revisions, and the bulk actions (nodeMakePrivate/NodeMakePublic)"
This can be reviewed.
Comment #11
arjenk commentedComment #13
batigolix