FlowDispatcher example

private FlowDispatcher $flowDispatcher;

    protected function setUp(): void
    {
        $this->ids = new TestDataCollection();
        $this->container = $this->createMock(ContainerInterface::class);
        $this->dispatcher = $this->createMock(EventDispatcherInterface::class);
        $logger = $this->createMock(LoggerInterface::class);
        $this->flowFactory = $this->createMock(FlowFactory::class);

        $this->flowDispatcher = new FlowDispatcher($this->dispatcher, $logger$this->flowFactory);
        $this->flowDispatcher->setContainer($this->container);
    }

    public function testDispatchWithNotFlowEventAware(): void
    {
        $order = new OrderEntity();
        $event = new CheckoutOrderPlacedEvent(
            Context::createDefaultContext(),
            $order,
            Defaults::SALES_CHANNEL_TYPE_STOREFRONT
        );

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