class RenderedEntityTest extends UnitTestCase
{ use ViewsLoggerTestTrait;
/**
* {@inheritdoc}
*/
protected function setUp(): void
{ 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);