Our unit tests use a mock-with-original-constructor for EntityField, which is something Drupal can't support BC for.

More specifically, up until 8.7, views/field/EntityField used the "entity.manager" service. After 8.7, it removed this deprecated usage and replaced this constructor argument with "entity_type.manager", adding "entity.repository" and "entity_field.manager" as optional arguments to maintain BC, and internally loading these from the container if they were not passed.

To support this without dropping support for 8.3+, the unit test needs to register its mock of entity.manager under the names "entity.repository" and "entity_field.manager" as well.

Once the minimum version is bumped to 8.7+, remove this workaround and only mock the new services.

CommentFileSizeAuthor
#2 rest_views-3144059-2.patch2.61 KBcburschka

Comments

cburschka created an issue. See original summary.

cburschka’s picture

StatusFileSize
new2.61 KB
cburschka’s picture

Status: Active » Needs review
cburschka’s picture

Status: Needs review » Fixed

Test failures fixed.

  • cburschka committed f65b2f9 on 8.x-1.x
    Issue #3144059 by cburschka: Tests do not pass in 8.7+
    
    Forward...

  • cburschka committed f65b2f9 on 8.x-1.x
    Issue #3144059 by cburschka: Tests do not pass in 8.7+
    
    Forward...

Status: Fixed » Closed (fixed)

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