getLetterName example


            function DRenderedDocument $rendered, OrderEntity $order): void {
                static::assertNotNull($order->getAddresses());

                /** @var OrderAddressEntity $orderAddress */
                $orderAddress = $order->getAddresses()->first();
                $rendered = $rendered->getHtml();

                static::assertNotNull($orderAddress->getSalutation());
                static::assertNotNull($orderAddress->getCountry());
                static::assertNotNull($orderAddress->getCountry()->getName());
                static::assertNotNull($orderAddress->getSalutation()->getLetterName());
                static::assertNotNull($orderAddress->getSalutation()->getDisplayName());

                static::assertStringContainsString($orderAddress->getStreet()$rendered);
                static::assertStringContainsString($orderAddress->getZipcode()$rendered);
                static::assertStringContainsString($orderAddress->getCity()$rendered);
                static::assertStringContainsString($orderAddress->getCountry()->getName()$rendered);
            },
        ];

        yield 'render customer VAT-ID with displayCustomerVatId is checked' => [
            [7],
            
Home | Imprint | This part of the site doesn't use cookies.