Hardcoded Entity Key in Test

Created on 1 December 2024, 3 months ago

Problem/Motivation

Hard coded values of any kind prevent developers from building on core logic. In this case the owner entity key is hardcoded for the base resource test in JSONAPI.

Steps to reproduce

Build tests on "ResourceTestBase" with an entity that implements the EntityOwnerInterface but change the key for the owner field from "uid" to something else.

Proposed resolution

Get owner key from the entity type.

Remaining tasks

Review code.

User interface changes

None.

Introduced terminology

None.

API changes

None.

Data model changes

None.

Release notes snippet

None.

πŸ› Bug report
Status

Needs work

Version

11.1 πŸ”₯

Component

jsonapi.module

Created by

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024