$eventDispatcher->
addListener(EntityLoadedContainerEvent::
class,
static function D
$inner) use (&
$event): void
{ $event =
$inner;
});
$repo =
new EntityRepository( $this->
createMock(EntityDefinition::
class),
$reader,
$this->
createMock(VersionManager::
class),
$this->
createMock(EntitySearcherInterface::
class),
$this->
createMock(EntityAggregatorInterface::
class),
$eventDispatcher,
new EntityLoadedEventFactory($this->
createMock(DefinitionInstanceRegistry::
class)) );
$criteria =
new Criteria();
$criteria->
addFields(['foo'
]);
$repo->
search($criteria, Context::
createDefaultContext());
static::
assertTrue(true
);
static::
assertInstanceOf(EntityLoadedContainerEvent::
class,
$event);
$events =
$event->
getEvents();
static::
assertInstanceOf(NestedEventCollection::
class,
$events);