Skip to content

Commit ef1690b

Browse files
author
Roman Lytvynenko
committed
MC-18094: Full page cache issue with non-default store view
1 parent 5edb053 commit ef1690b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

app/code/Magento/Store/Test/Unit/App/Action/Plugin/ContextNonDefaultStoreDirectLinkTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
declare(strict_types=1);
8+
69
namespace Magento\Store\Test\Unit\App\Action\Plugin;
710

811
use Magento\Framework\App\Action\AbstractAction;
9-
use Magento\Framework\App\Http\Context;
1012
use Magento\Framework\App\Http\Context as HttpContext;
1113
use Magento\Framework\App\RequestInterface;
1214
use Magento\Framework\Session\Generic;
1315
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
1416
use Magento\Store\Api\StoreCookieManagerInterface;
17+
use Magento\Store\App\Action\Plugin\Context;
1518
use Magento\Store\Model\Store;
1619
use Magento\Store\Model\StoreManagerInterface;
1720
use Magento\Store\Model\Website;
@@ -29,6 +32,8 @@ class ContextNonDefaultStoreDirectLinkTest extends TestCase
2932
const CURRENCY_CURRENT_STORE = 'UAH';
3033

3134
/**
35+
* Test for full page cache hits from new http clients if store context was specified in the URL
36+
*
3237
* @dataProvider cacheHitOnDirectLinkToNonDefaultStoreView
3338
* @param $customStore
3439
* @param $defaultStore
@@ -57,13 +62,14 @@ public function testCacheHitOnDirectLinkToNonDefaultStoreView(
5762
->method('getValue')
5863
->with(StoreManagerInterface::CONTEXT_STORE)
5964
->willReturn(null);
65+
6066
$websiteMock = $this->createPartialMock(
6167
Website::class,
6268
['getDefaultStore', '__wakeup']
6369
);
6470

6571
$plugin = (new ObjectManager($this))->getObject(
66-
\Magento\Store\App\Action\Plugin\Context::class,
72+
Context::class,
6773
[
6874
'session' => $sessionMock,
6975
'httpContext' => $httpContextMock,

0 commit comments

Comments
 (0)