Problem/Motivation

\Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::testGet is currently testing for the Link header for all entity types. This fails for entity types with no link templates. Example \Drupal\aggregator\Entity\Item.

Proposed resolution

Tests for Link headers if the entity type has link templates.

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arshadcn created an issue. See original summary.

shadcn’s picture

Status: Needs work » Needs review
FileSize
2.61 KB
Wim Leers’s picture

Priority: Normal » Minor
Status: Needs review » Reviewed & tested by the community

Hah, great find!

Wim Leers’s picture

Title: Test for Link headers only for entity types with link templates » EntityResourceTestBase: only assert presence of Link headers for entity types that have link templates

Clarifying title.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 1816bcd to 8.4.x and 1c374f7 to 8.3.x. Thanks!

Chose to backport this to 8.3.x because it is a test-only improvement.

  • alexpott committed 1816bcd on 8.4.x
    Issue #2852992 by arshadcn: EntityResourceTestBase: only assert presence...

  • alexpott committed 1c374f7 on 8.3.x
    Issue #2852992 by arshadcn: EntityResourceTestBase: only assert presence...
Wim Leers’s picture

Yay :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.