setEventName example

$appEntity = new AppEntity();
        $appEntity->setId(Uuid::randomHex());
        $appEntity->setName('Cool App');
        $appEntity->setAclRoleId(Uuid::randomHex());
        $appEntity->setActive(true);
        $appEntity->setVersion('0.0.0');
        $appEntity->setAppSecret('verysecret');

        $webhookEntity = new WebhookEntity();
        $webhookEntity->setId(Uuid::randomHex());
        $webhookEntity->setName('Cool Webhook');
        $webhookEntity->setEventName($eventName);
        $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');

        
Home | Imprint | This part of the site doesn't use cookies.