Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: shadcn at Chapter Three commentedComment #3
shadcn CreditAttribution: shadcn at Chapter Three commentedComment #4
Wim LeersAny entity that does not have a UUID will not be deployable/syncable. The problem here is that the
Item
entity 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 :)