TriggerFlowController example

$this->appFlowEventRepository = new StaticEntityRepository([
            new EntitySearchResult(
                'app_flow_event',
                1,
                new AppFlowEventCollection([$appFlowEvent]),
                null,
                new Criteria(),
                Context::createDefaultContext(),
            ),
        ]);

        $this->triggerFlowController = new TriggerFlowController(new EventDispatcher()$this->appFlowEventRepository);
    }

    public function testTriggerWithWrongEventName(): void
    {
        $this->expectExceptionObject(new CustomTriggerByNameNotFoundException('custom.checkout.event'));

        $request = new Request();
        $request->setMethod('POST');
        $context = Context::createDefaultContext();
        $appFlowEventRepository = new StaticEntityRepository([
            new EntitySearchResult(
                
Home | Imprint | This part of the site doesn't use cookies.