Skip to content

Commit 86fe123

Browse files
Refactored typo in constant name \Magento\Security\Model\Config::XML_PATH_FRONTEND_AREA
1 parent 3963446 commit 86fe123

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

app/code/Magento/Security/Model/Config.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,17 @@ class Config implements ConfigInterface
2424
*/
2525
const XML_PATH_ADMIN_AREA = 'admin/security/';
2626

27+
/**
28+
* Configuration path to frontend area
29+
*/
30+
const XML_PATH_FRONTEND_AREA = 'customer/password/';
31+
2732
/**
2833
* Configuration path to fronted area
34+
* @deprecated
35+
* @see \Magento\Security\Model\Config::XML_PATH_FRONTEND_AREA
2936
*/
30-
const XML_PATH_FRONTED_AREA = 'customer/password/';
37+
const XML_PATH_FRONTED_AREA = self::XML_PATH_FRONTEND_AREA;
3138

3239
/**
3340
* Configuration path to admin account sharing
@@ -134,7 +141,7 @@ protected function getXmlPathPrefix()
134141
if ($this->scope->getCurrentScope() == \Magento\Framework\App\Area::AREA_ADMINHTML) {
135142
return self::XML_PATH_ADMIN_AREA;
136143
}
137-
return self::XML_PATH_FRONTED_AREA;
144+
return self::XML_PATH_FRONTEND_AREA;
138145
}
139146

140147
/**

app/code/Magento/Security/Test/Unit/Model/ConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ protected function getXmlPathPrefix($scope)
167167
if ($scope == \Magento\Framework\App\Area::AREA_ADMINHTML) {
168168
return \Magento\Security\Model\Config::XML_PATH_ADMIN_AREA;
169169
}
170-
return \Magento\Security\Model\Config::XML_PATH_FRONTED_AREA;
170+
return \Magento\Security\Model\Config::XML_PATH_FRONTEND_AREA;
171171
}
172172

173173
/**

dev/tests/api-functional/testsuite/Magento/Customer/Api/AccountManagementTest.php

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,12 @@
88
use Magento\Customer\Api\Data\CustomerInterface as Customer;
99
use Magento\Customer\Model\AccountManagement;
1010
use Magento\Framework\Exception\InputException;
11-
use Magento\Framework\Exception\NoSuchEntityException;
11+
use Magento\Framework\Webapi\Exception as HTTPExceptionCodes;
12+
use Magento\Newsletter\Model\Subscriber;
13+
use Magento\Security\Model\Config;
1214
use Magento\TestFramework\Helper\Bootstrap;
1315
use Magento\TestFramework\Helper\Customer as CustomerHelper;
1416
use Magento\TestFramework\TestCase\WebapiAbstract;
15-
use Magento\Framework\Webapi\Exception as HTTPExceptionCodes;
16-
use Magento\Security\Model\Config;
17-
use Magento\Newsletter\Model\Plugin\CustomerPlugin;
18-
use Magento\Framework\Webapi\Rest\Request as RestRequest;
19-
use Magento\Newsletter\Model\Subscriber;
20-
use Magento\Customer\Model\Data\Customer as CustomerData;
2117

2218
/**
2319
* Test class for Magento\Customer\Api\AccountManagementInterface
@@ -112,16 +108,16 @@ public function setUp()
112108
$this->initSubscriber();
113109

114110
if ($this->config->getConfigDataValue(
115-
Config::XML_PATH_FRONTED_AREA .
111+
Config::XML_PATH_FRONTEND_AREA .
116112
Config::XML_PATH_PASSWORD_RESET_PROTECTION_TYPE
117113
) != 0) {
118114
$this->configValue = $this->config
119115
->getConfigDataValue(
120-
Config::XML_PATH_FRONTED_AREA .
116+
Config::XML_PATH_FRONTEND_AREA .
121117
Config::XML_PATH_PASSWORD_RESET_PROTECTION_TYPE
122118
);
123119
$this->config->setDataByPath(
124-
Config::XML_PATH_FRONTED_AREA . Config::XML_PATH_PASSWORD_RESET_PROTECTION_TYPE,
120+
Config::XML_PATH_FRONTEND_AREA . Config::XML_PATH_PASSWORD_RESET_PROTECTION_TYPE,
125121
0
126122
);
127123
$this->config->save();
@@ -150,7 +146,7 @@ public function tearDown()
150146
}
151147
}
152148
$this->config->setDataByPath(
153-
Config::XML_PATH_FRONTED_AREA . Config::XML_PATH_PASSWORD_RESET_PROTECTION_TYPE,
149+
Config::XML_PATH_FRONTEND_AREA . Config::XML_PATH_PASSWORD_RESET_PROTECTION_TYPE,
154150
$this->configValue
155151
);
156152
$this->config->save();

0 commit comments

Comments
 (0)