Skip to content

Commit 35e2f12

Browse files
committed
Merge remote-tracking branch 'origin/2.4-develop-com-pr13' into 2.4-develop-com-pr13
2 parents f4ca6de + 1135848 commit 35e2f12

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

dev/tests/integration/testsuite/Magento/Customer/Model/EmailNotificationTest.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,36 @@ public function testRemindPasswordCustomTemplate(): void
141141
$this->assertMessage($expectedSender);
142142
}
143143

144+
/**
145+
* @magentoDataFixture Magento/Customer/_files/customer.php
146+
*
147+
* @return void
148+
*/
149+
public function testChangeEmailCustomTemplate(): void
150+
{
151+
$this->setEmailTemplateConfig(EmailNotification::XML_PATH_CHANGE_EMAIL_TEMPLATE);
152+
$customer = $this->customerRepository->get('customer@example.com');
153+
$customer->setEmail('customer_update@example.com');
154+
$this->emailNotification->credentialsChanged($customer, 'customer@example.com');
155+
$expectedSender = ['name' => 'CustomerSupport', 'email' => 'support@example.com'];
156+
$this->assertMessage($expectedSender);
157+
}
158+
159+
/**
160+
* @magentoDataFixture Magento/Customer/_files/customer.php
161+
*
162+
* @return void
163+
*/
164+
public function testChangeEmailAndPasswordCustomTemplate(): void
165+
{
166+
$this->setEmailTemplateConfig(EmailNotification::XML_PATH_CHANGE_EMAIL_AND_PASSWORD_TEMPLATE);
167+
$customer = $this->customerRepository->get('customer@example.com');
168+
$customer->setEmail('customer_update@example.com');
169+
$this->emailNotification->credentialsChanged($customer, 'customer@example.com', true);
170+
$expectedSender = ['name' => 'CustomerSupport', 'email' => 'support@example.com'];
171+
$this->assertMessage($expectedSender);
172+
}
173+
144174
/**
145175
* Assert message.
146176
*

0 commit comments

Comments
 (0)