File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
dev/tests/integration/testsuite/Magento/Customer/Model Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff 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 *
You can’t perform that action at this time.
0 commit comments