Problem/Motivation
The test class in core/modules/node/tests/src/Functional/NodeTranslationUITest.php uses a regular database query instead of using an entity query.
Proposed resolution
Replace the regular database query with an entity query.
Remaining tasks
TBD
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
TBD
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | interdiff-4-12.txt | 619 bytes | hardik_patel_12 |
| #12 | 3151968-12.patch | 1.39 KB | hardik_patel_12 |
Comments
Comment #2
daffie commentedPatch changes the db query to an entity query.
Comment #3
snehalgaikwad commentedComment #4
snehalgaikwad commentedRemoved use statement for database, which was not in use.
Comment #5
daffie commented@snehalgaikwad: Can you add an interdiff.txt. It makes reviewing the changes that you made a lot easier.
Comment #6
daffie commented@snehalgaikwad: Can you say that the change from a database query to an entity query is done correctly?
Comment #7
hardik_patel_12 commentedInterfdiif for patch at #4 and #2. After replacing Database::getConnection()->query with entityQuery 'use Drupal\Core\Database\Database;' becomes unused .
Comment #8
hardik_patel_12 commentedAll the test cases are passed verified on local , so moving to RTBC.
Comment #9
pratik_kambleComment #10
pratik_kambleComment #11
catchThis should have an ->accessCheck(FALSE).
Comment #12
hardik_patel_12 commentedAdding the requested ->accessCheck(FALSE) to EntityQuery.
Comment #13
daffie commentedChange looks like what @catch requested.
Back to RTBC.
Comment #15
catchCommitted 308db36 and pushed to 9.1.x. Thanks!