MessageStorer example



        $mail = new Email();
        $mail->html('text/plain');

        $event = new MailBeforeSentEvent(
            $data,
            $mail,
            Context::createDefaultContext()
        );

        $storer = new MessageStorer();
        $stored = $storer->store($event$storedData);

        static::assertArrayHasKey(MessageAware::MESSAGE, $stored);
        static::assertIsString($stored[MessageAware::MESSAGE]);
    }

    public function testStoreExistsData(): void
    {
        $storedData = [['message' => '[]']];
        $data = [
            'subject' => 'Hi',
            
Home | Imprint | This part of the site doesn't use cookies.