$this->assertEquals($referenced_entity_with_no_link_template->label(),$build[0]['#plain_text'],sprintf('The markup returned by the %s formatter is correct for an entity type with no valid link template.',$formatter));
// Test link visibility if the URL is not accessible.
$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.');