Skip to content

Commit e9aa786

Browse files
author
Bohdan Korablov
committed
MAGETWO-44045: Reset password page not displayed, instead user login page displayed.
1 parent de154cc commit e9aa786

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

app/code/Magento/Newsletter/Test/Unit/Model/Queue/TransportBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function testGetTransport(
103103

104104
$transport = $this->getMock('\Magento\Framework\Mail\TransportInterface');
105105

106-
$this->_mailTransportFactoryMock->expects(
106+
$this->mailTransportFactoryMock->expects(
107107
$this->at(0)
108108
)->method(
109109
'create'

app/code/Magento/User/Model/User.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ public function sendPasswordResetConfirmationEmail()
369369
{
370370
$templateId = $this->_config->getValue(self::XML_PATH_FORGOT_EMAIL_TEMPLATE);
371371
$transport = $this->_transportBuilder->setTemplateIdentifier($templateId)
372-
->setTemplateNamespace('Magento\Email\Model\BackendTemplate')
372+
->setTemplateModel('Magento\Email\Model\BackendTemplate')
373373
->setTemplateOptions(['area' => FrontNameResolver::AREA_CODE, 'store' => Store::DEFAULT_STORE_ID])
374374
->setTemplateVars(['user' => $this, 'store' => $this->_storeManager->getStore(Store::DEFAULT_STORE_ID)])
375375
->setFrom($this->_config->getValue(self::XML_PATH_FORGOT_EMAIL_IDENTITY))
@@ -389,7 +389,7 @@ public function sendPasswordResetNotificationEmail()
389389
{
390390
$templateId = $this->_config->getValue(self::XML_PATH_RESET_PASSWORD_TEMPLATE);
391391
$transport = $this->_transportBuilder->setTemplateIdentifier($templateId)
392-
->setTemplateNamespace('Magento\Email\Model\BackendTemplate')
392+
->setTemplateModel('Magento\Email\Model\BackendTemplate')
393393
->setTemplateOptions(['area' => FrontNameResolver::AREA_CODE, 'store' => Store::DEFAULT_STORE_ID])
394394
->setTemplateVars(['user' => $this, 'store' => $this->_storeManager->getStore(Store::DEFAULT_STORE_ID)])
395395
->setFrom($this->_config->getValue(self::XML_PATH_FORGOT_EMAIL_IDENTITY))

app/code/Magento/User/Test/Unit/Model/UserTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public function testSendPasswordResetNotificationEmail()
171171
->with(\Magento\User\Model\User::XML_PATH_FORGOT_EMAIL_IDENTITY)
172172
->willReturn('sender');
173173
$this->transportBuilderMock->expects($this->once())
174-
->method('setTemplateNamespace')
174+
->method('setTemplateModel')
175175
->with($this->equalTo('Magento\Email\Model\BackendTemplate'))
176176
->willReturnSelf();
177177
$this->transportBuilderMock->expects($this->once())
@@ -229,7 +229,7 @@ public function testSendPasswordResetConfirmationEmail()
229229
->with(\Magento\User\Model\User::XML_PATH_FORGOT_EMAIL_IDENTITY)
230230
->willReturn('sender');
231231
$this->transportBuilderMock->expects($this->once())
232-
->method('setTemplateNamespace')
232+
->method('setTemplateModel')
233233
->with($this->equalTo('Magento\Email\Model\BackendTemplate'))
234234
->willReturnSelf();
235235
$this->transportBuilderMock->expects($this->once())

lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ class TransportBuilder
2424
protected $templateIdentifier;
2525

2626
/**
27-
* Template Namespace
27+
* Template Model
2828
*
2929
* @var string
3030
*/
31-
protected $templateNamespace;
31+
protected $templateModel;
3232

3333
/**
3434
* Template Variables
@@ -182,14 +182,14 @@ public function setTemplateIdentifier($templateIdentifier)
182182
}
183183

184184
/**
185-
* Set template namespace
185+
* Set template model
186186
*
187-
* @param string $templateNamespace
187+
* @param string $templateModel
188188
* @return $this
189189
*/
190-
public function setTemplateNamespace($templateNamespace)
190+
public function setTemplateModel($templateModel)
191191
{
192-
$this->templateNamespace = $templateNamespace;
192+
$this->templateModel = $templateModel;
193193
return $this;
194194
}
195195

@@ -252,7 +252,7 @@ protected function reset()
252252
*/
253253
protected function getTemplate()
254254
{
255-
return $this->templateFactory->get($this->templateIdentifier, $this->templateNamespace)
255+
return $this->templateFactory->get($this->templateIdentifier, $this->templateModel)
256256
->setVars($this->templateVars)
257257
->setOptions($this->templateOptions);
258258
}

lib/internal/Magento/Framework/Mail/Test/Unit/Template/TransportBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function setUp()
8181
*/
8282
public function testGetTransport($templateType, $messageType, $bodyText, $templateNamespace)
8383
{
84-
$this->builder->setTemplateNamespace($templateNamespace);
84+
$this->builder->setTemplateModel($templateNamespace);
8585

8686
$vars = ['reason' => 'Reason', 'customer' => 'Customer'];
8787
$options = ['area' => 'frontend', 'store' => 1];

0 commit comments

Comments
 (0)