CodeExplorer WebhookCollection example
$webhookEntity->
setApp($appEntity);
$webhookEntity->
setUrl('https://foo.bar'
);
return $webhookEntity;
} private function prepareContainer(WebhookEntity
$webhookEntity): void
{ $shopIdProvider =
$this->
createMock(ShopIdProvider::
class);
$shopIdProvider->
expects(static::
once())->
method('getShopId'
)->
willReturn('foobar'
);
$this->container->
set('webhook.repository',
new StaticEntityRepository([new WebhookCollection([$webhookEntity])]));
$this->container->
set(AppLocaleProvider::
class,
$this->
createMock(AppLocaleProvider::
class));
$this->container->
set(ShopIdProvider::
class,
$shopIdProvider);
}}