getSalutationRoute example

public function testType(): void
    {
        $formCmsElementResolver = $this->getContainer()->get(FormCmsElementResolver::class);

        static::assertEquals('form', $formCmsElementResolver->getType());
    }

    public function testResolverUsesAbstractSalutationsRouteToEnrichSlot(): void
    {
        $salutationCollection = $this->getSalutationCollection();
        $formCmsElementResolver = new FormCmsElementResolver($this->getSalutationRoute($salutationCollection));

        $formElement = $this->getCmsFormElement();

        $formCmsElementResolver->enrich(
            $formElement,
            new ResolverContext($this->createMock(SalesChannelContext::class)new Request()),
            new ElementDataCollection()
        );

        static::assertSame($formElement->getData()$salutationCollection);
    }

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