Issue #3489179 by godotislate, ghost of drupal past: Referring the same entity...
Issue #3489179 by godotislate, ghost of drupal past: Referring the same entity multiple times breaks _referringItem
(cherry picked from commit 40c1ab52)
@@ -424,6 +424,44 @@ public function testLabelFormatter(): void {
$this->assertEquals($build[0]['#plain_text'],$entity_with_user->get('user_id')->entity->label(),'For inaccessible links, the label should be displayed in plain text.');
}
/**
* Tests formatters set the correct _referringItem on referenced entities.
$this->assertEquals($default_images['field']->id(),$article_built[$field_name][0]['#item']->target_id,"A new article node without an image has the expected default image file ID of {$default_images['field']->id()}.");
// Confirm that the default image entity _referringItem property is set to
$this->assertEquals($default_images['field']->id(),$article2_built[$field_name][0]['#item']->target_id,"A new article node without an image has the expected default image file ID of {$default_images['field']->id()}.");
// Confirm that the default image entity _referringItem property is set to