ContactFormDataStorer example


class ContactFormDataStorerTest extends TestCase
{
    private ContactFormDataStorer $storer;

    protected function setUp(): void
    {
        Feature::skipTestIfActive('v6.6.0.0', $this);

        $this->storer = new ContactFormDataStorer();
    }

    public function testStoreAware(): void
    {
        $event = new ContactFormEvent(Context::createDefaultContext(), '', new MailRecipientStruct([])new DataBag());
        $stored = [];
        $stored = $this->storer->store($event$stored);
        static::assertArrayHasKey(ContactFormDataAware::CONTACT_FORM_DATA, $stored);
    }

    public function testStoreNotAware(): void
    {
Home | Imprint | This part of the site doesn't use cookies.