Skip to content
Snippets Groups Projects
Commit 76b16b3d authored by Oleksii Korshenko's avatar Oleksii Korshenko Committed by GitHub
Browse files

MAGETWO-84955: Set Current Store from Store Code if isUseStoreInUrl #12529

parents 7412e61e b2505793
Branches
No related merge requests found
......@@ -44,7 +44,7 @@ class PathInfoProcessor implements \Magento\Framework\App\Request\PathInfoProces
if ($store->isUseStoreInUrl()) {
if (!$request->isDirectAccessFrontendName($storeCode) && $storeCode != Store::ADMIN_CODE) {
$this->storeManager->setCurrentStore($storeCode);
$this->storeManager->setCurrentStore($store->getCode());
$pathInfo = '/' . (isset($pathParts[1]) ? $pathParts[1] : '');
return $pathInfo;
} elseif (!empty($storeCode)) {
......
......@@ -47,6 +47,7 @@ class PathInfoProcessorTest extends \PHPUnit\Framework\TestCase
)->with(
'storeCode'
)->willReturn($store);
$store->expects($this->once())->method('getCode')->will($this->returnValue('storeCode'));
$store->expects($this->once())->method('isUseStoreInUrl')->will($this->returnValue(true));
$this->_requestMock->expects(
$this->once()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment