Problem/Motivation
This is follow-up from tests for #2843752: EntityResource: Provide comprehensive test coverage for Item entity.
\Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::testPost tests for uuid field for all entity types. Some entity types. eg \Drupal\aggregator\Entity\Item has no uuid field.
Proposed resolution
Add check for uuid field in \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::testPost
Remaining tasks
1. Write patch.
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | entityresourcetestbase-2857086-2.patch | 1.47 KB | shadcn |
Comments
Comment #2
shadcn commentedComment #3
shadcn commentedComment #4
wim leersAny entity that does not have a UUID will not be deployable/syncable. The problem here is that the
Itementity type does not have a UUID. But we have #2149851: Remove todo about GUID field on the 'aggregator_item' entity and add UUID field to fix that.So I'd rather fix #2149851: Remove todo about GUID field on the 'aggregator_item' entity and add UUID field instead.
Besides, making the change proposed here means less test coverage for a particular kind of failure: we're then no longer testing for UUID-less entities whether basic entity field validation constraints are tested.
Comment #5
wim leersThis was fixed as part of #2843752: EntityResource: Provide comprehensive test coverage for Item entity :)