Skip to content

Commit 4133e11

Browse files
arnie1947ihor-sviziev
authored andcommitted
MAGETWO-63154: Special characters in store name converted to numerical character references in email subject
- Integration test added. (cherry picked from commit 750e1ad)
1 parent 653bfef commit 4133e11

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,38 @@ public function testLogoutAction()
6666
$this->assertRedirect($this->stringContains('customer/account/logoutSuccess'));
6767
}
6868

69+
/**
70+
* Test that forgot password email message displays special characters correctly.
71+
*
72+
* @magentoConfigFixture current_store customer/password/limit_password_reset_requests_method 0
73+
* @magentoConfigFixture current_store customer/password/forgot_email_template customer_password_forgot_email_template
74+
* @magentoConfigFixture current_store customer/password/forgot_email_identity support
75+
* @magentoConfigFixture current_store general/store_information/name Test special' characters
76+
* @magentoDataFixture Magento/Customer/_files/customer.php
77+
*/
78+
public function testForgotPasswordEmailMessageWithSpecialCharacters()
79+
{
80+
$email = '[email protected]';
81+
82+
$this->getRequest()
83+
->setPostValue([
84+
'email' => $email,
85+
]);
86+
87+
$this->dispatch('customer/account/forgotPasswordPost');
88+
$this->assertRedirect($this->stringContains('customer/account/'));
89+
90+
/** @var \Magento\TestFramework\Mail\Template\TransportBuilderMock $transportBuilder */
91+
$transportBuilder = $this->_objectManager->get(
92+
\Magento\TestFramework\Mail\Template\TransportBuilderMock::class
93+
);
94+
$subject = $transportBuilder->getSentMessage()->getSubject();
95+
$this->assertContains(
96+
'Test special\' characters',
97+
$subject
98+
);
99+
}
100+
69101
/**
70102
* @magentoDataFixture Magento/Customer/_files/customer.php
71103
*/

0 commit comments

Comments
 (0)