Problem/Motivation
The test class in core/modules/node/tests/src/Functional/NodeRevisionPermissionsTest.php uses a regular database queries instead of using an entity queries.
Proposed resolution
Replace the regular database queries with an entity queries.
Remaining tasks
TBD
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
TBD
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 3151990-9.patch | 1.01 KB | daffie |
Comments
Comment #2
daffie commentedPatch changes the db queries to entity queries.
Comment #3
hardik_patel_12 commentedVerified this patch on local. Looks good to me.
Comment #4
pratik_kambleComment #5
pratik_kambleComment #7
catchIs this wasn't a test I'd have said we should do $query->execute() in the condition, but given it is a test there's no reason to optimise.
Committed/pushed to 9.1.x, thanks!
Comment #8
catchI missed this prior to commit, but both queries here need ->accessCheck(FALSE) since they're querying what's in the database as opposed to what can be shown to the current user.
Comment #9
daffie commentedAdding the requested
->accessCheck(FALSE)to both EntityQueries.Comment #10
hardik_patel_12 commentedComment #11
hardik_patel_12 commentedSorry, trying to assign other issue
Comment #12
hardik_patel_12 commentedBack to RTBC , accessCheck is added to both queries as suggested by @catch.
Comment #14
catchCommitted d7334ba and pushed to 9.1.x. Thanks!