assertDispatchedMailEvent example

if ($event instanceof MailBeforeSentEvent) {
                $mailEvent = $event;
            }
        };
        $this->addEventListener($this->eventDispatcher, MailBeforeSentEvent::class$mailListener);

        $this->changeTransactionStateToPaid($orderId);

        $this->resetEventDispatcher();

        $this->assertDispatchedFlowEvent($productDownloads$flowEvent);
        $this->assertDispatchedMailEvent($productDownloads$mailEvent);

        $this->assertOrderWithGrantedAccess($orderId$productDownloads);
    }

    /** * @param array<int, string[]> $productDownloads * * @dataProvider orderCaseProvider */
    public function testFlowActionRunsOnOrderPlaced(array $productDownloads): void
    {
        
Home | Imprint | This part of the site doesn't use cookies.