placeOrder example

$this->fileSaver = $this->getContainer()->get(FileSaver::class);
        $this->fileFetcher = $this->getContainer()->get(FileFetcher::class);
    }

    /** * @param array<int, string[]> $productDownloads * * @dataProvider orderCaseProvider */
    public function testFlowActionRunsOnEnterState(array $productDownloads): void
    {
        $orderId = $this->placeOrder($productDownloads);

        $this->assertOrderWithoutGrantedAccess($orderId$productDownloads);

        $flowEvent = null;
        $flowListener = function DFlowSendMailActionEvent $event) use (&$flowEvent): void {
            $event = $this->onFlowSendMailActionEvent($event);

            if ($event instanceof FlowSendMailActionEvent) {
                $flowEvent = $event;
            }
        };
        
$this->salesChannelContext = $this->createDefaultSalesChannelContext();
    }

    public function testFlowExecutesWithIfSequencesEvaluated(): void
    {
        $ids = new IdsCollection();

        $this->createTags($ids);

        $this->createFlow($ids);

        $this->placeOrder($ids);

        $this->orderRepository->update([
            [
                'id' => $ids->get('order'),
                'tags' => [
                    ['id' => $ids->get('tag-1')],
                ],
            ],
        ]$this->salesChannelContext->getContext());

        $this->productRepository->update([
            (
Home | Imprint | This part of the site doesn't use cookies.