AppFlowActionProvider example

$stringTemplateRender->expects(static::exactly(6))
            ->method('render')
            ->willReturnOnConsecutiveCalls(
                'Text 1',
                'Text 2',
                'Text 3',
                'Text 1',
                'Text 2 and Text 3',
                'application/json'
            );

        $appFlowActionProvider = new AppFlowActionProvider(
            $connection,
            $this->createMock(BusinessEventEncoder::class),
            $stringTemplateRender
        );

        $webhookData = $appFlowActionProvider->getWebhookPayloadAndHeaders($flow$ids->get('appFlowActionId'));

        static::assertEquals(['param1' => 'Text 1', 'param2' => 'Text 2 and Text 3']$webhookData['payload']);
        static::assertEquals(['content-type' => 'application/json']$webhookData['headers']);
    }
}
Home | Imprint | This part of the site doesn't use cookies.