Skip to content

Commit 750e1ad

Browse files
arnie1947nikshostko
authored andcommitted
MAGETWO-63154: Special characters in store name converted to numerical character references in email subject
- Integration test added.
1 parent 00001fb commit 750e1ad

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
@@ -64,6 +64,38 @@ public function testLogoutAction()
6464
$this->assertRedirect($this->stringContains('customer/account/logoutSuccess'));
6565
}
6666

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

0 commit comments

Comments
 (0)