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
Currently, the entity reference field has almost no test coverage for its formatters. Minimal coverage will be added in #2099131: Use #pre_render pattern for entity render caching. The remaining formatters require coverage.
Proposed resolution
Add test coverage for untested formatters.
See \Drupal\entity_reference\Tests\EntityReferenceFormatterTest:testIdFormatter()
for an example. We can probably move much of the setup code in the two existing test methods into the setup method to avoid duplication.
User interface changes
None.
API changes
None.
Comments
Comment #1
amateescu CreditAttribution: amateescu commentedThis is being done in #2370703: ER's "autocreate" feature is mostly broken (and untested).