CustomerSalutationSubscriber example


class CustomerSalutationSubscriberTest extends TestCase
{
    private MockObject&Connection $connection;

    private CustomerSalutationSubscriber $salutationSubscriber;

    protected function setUp(): void
    {
        $this->connection = $this->createMock(Connection::class);

        $this->salutationSubscriber = new CustomerSalutationSubscriber($this->connection);
    }

    public function testGetSubscribedEvents(): void
    {
        static::assertEquals([
            CustomerEvents::CUSTOMER_WRITTEN_EVENT => 'setDefaultSalutation',
            CustomerEvents::CUSTOMER_ADDRESS_WRITTEN_EVENT => 'setDefaultSalutation',
        ]$this->salutationSubscriber->getSubscribedEvents());
    }

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