Skip to content

Commit

Permalink
Refactored typo in constant name \Magento\Security\Model\Config::XML_…
Browse files Browse the repository at this point in the history
…PATH_FRONTEND_AREA
  • Loading branch information
adrian-martinez-interactiv4 committed Oct 27, 2017
1 parent 3963446 commit 86fe123
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
11 changes: 9 additions & 2 deletions app/code/Magento/Security/Model/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,17 @@ class Config implements ConfigInterface
*/
const XML_PATH_ADMIN_AREA = 'admin/security/';

/**
* Configuration path to frontend area
*/
const XML_PATH_FRONTEND_AREA = 'customer/password/';

/**
* Configuration path to fronted area
* @deprecated
* @see \Magento\Security\Model\Config::XML_PATH_FRONTEND_AREA
*/
const XML_PATH_FRONTED_AREA = 'customer/password/';
const XML_PATH_FRONTED_AREA = self::XML_PATH_FRONTEND_AREA;

/**
* Configuration path to admin account sharing
Expand Down Expand Up @@ -134,7 +141,7 @@ protected function getXmlPathPrefix()
if ($this->scope->getCurrentScope() == \Magento\Framework\App\Area::AREA_ADMINHTML) {
return self::XML_PATH_ADMIN_AREA;
}
return self::XML_PATH_FRONTED_AREA;
return self::XML_PATH_FRONTEND_AREA;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Security/Test/Unit/Model/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ protected function getXmlPathPrefix($scope)
if ($scope == \Magento\Framework\App\Area::AREA_ADMINHTML) {
return \Magento\Security\Model\Config::XML_PATH_ADMIN_AREA;
}
return \Magento\Security\Model\Config::XML_PATH_FRONTED_AREA;
return \Magento\Security\Model\Config::XML_PATH_FRONTEND_AREA;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,12 @@
use Magento\Customer\Api\Data\CustomerInterface as Customer;
use Magento\Customer\Model\AccountManagement;
use Magento\Framework\Exception\InputException;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\Webapi\Exception as HTTPExceptionCodes;
use Magento\Newsletter\Model\Subscriber;
use Magento\Security\Model\Config;
use Magento\TestFramework\Helper\Bootstrap;
use Magento\TestFramework\Helper\Customer as CustomerHelper;
use Magento\TestFramework\TestCase\WebapiAbstract;
use Magento\Framework\Webapi\Exception as HTTPExceptionCodes;
use Magento\Security\Model\Config;
use Magento\Newsletter\Model\Plugin\CustomerPlugin;
use Magento\Framework\Webapi\Rest\Request as RestRequest;
use Magento\Newsletter\Model\Subscriber;
use Magento\Customer\Model\Data\Customer as CustomerData;

/**
* Test class for Magento\Customer\Api\AccountManagementInterface
Expand Down Expand Up @@ -112,16 +108,16 @@ public function setUp()
$this->initSubscriber();

if ($this->config->getConfigDataValue(
Config::XML_PATH_FRONTED_AREA .
Config::XML_PATH_FRONTEND_AREA .
Config::XML_PATH_PASSWORD_RESET_PROTECTION_TYPE
) != 0) {
$this->configValue = $this->config
->getConfigDataValue(
Config::XML_PATH_FRONTED_AREA .
Config::XML_PATH_FRONTEND_AREA .
Config::XML_PATH_PASSWORD_RESET_PROTECTION_TYPE
);
$this->config->setDataByPath(
Config::XML_PATH_FRONTED_AREA . Config::XML_PATH_PASSWORD_RESET_PROTECTION_TYPE,
Config::XML_PATH_FRONTEND_AREA . Config::XML_PATH_PASSWORD_RESET_PROTECTION_TYPE,
0
);
$this->config->save();
Expand Down Expand Up @@ -150,7 +146,7 @@ public function tearDown()
}
}
$this->config->setDataByPath(
Config::XML_PATH_FRONTED_AREA . Config::XML_PATH_PASSWORD_RESET_PROTECTION_TYPE,
Config::XML_PATH_FRONTEND_AREA . Config::XML_PATH_PASSWORD_RESET_PROTECTION_TYPE,
$this->configValue
);
$this->config->save();
Expand Down

0 comments on commit 86fe123

Please sign in to comment.