parent::
setUp();
$this->
setUpMockLoggerWithMissingEntity();
} /**
* Tests the render method when getEntity returns NULL.
*
* @covers ::render
*/
public function testRenderNullEntity(): void
{ $row =
new ResultRow();
$field =
new RenderedEntity(['entity_type' => 'foo', 'entity field' => 'bar'
], '',
[],
$this->
createMock(EntityTypeManagerInterface::
class),
$this->
createMock(LanguageManagerInterface::
class),
$this->
createMock(EntityRepositoryInterface::
class),
$this->
createMock(EntityDisplayRepositoryInterface::
class));
$view =
$this->
createMock(ViewExecutable::
class);
$display =
$this->
createMock(DisplayPluginBase::
class);
$field->
init($view,
$display);
$this->
assertEmpty($field->
render($row));
}}