3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+
7
+ declare (strict_types=1 );
8
+
6
9
namespace Magento \Store \Test \Unit \App \Action \Plugin ;
7
10
8
11
use Magento \Framework \App \Action \AbstractAction ;
9
- use Magento \Framework \App \Http \Context ;
10
12
use Magento \Framework \App \Http \Context as HttpContext ;
11
13
use Magento \Framework \App \RequestInterface ;
12
14
use Magento \Framework \Session \Generic ;
13
15
use Magento \Framework \TestFramework \Unit \Helper \ObjectManager ;
14
16
use Magento \Store \Api \StoreCookieManagerInterface ;
17
+ use Magento \Store \App \Action \Plugin \Context ;
15
18
use Magento \Store \Model \Store ;
16
19
use Magento \Store \Model \StoreManagerInterface ;
17
20
use Magento \Store \Model \Website ;
@@ -29,6 +32,8 @@ class ContextNonDefaultStoreDirectLinkTest extends TestCase
29
32
const CURRENCY_CURRENT_STORE = 'UAH ' ;
30
33
31
34
/**
35
+ * Test for full page cache hits from new http clients if store context was specified in the URL
36
+ *
32
37
* @dataProvider cacheHitOnDirectLinkToNonDefaultStoreView
33
38
* @param $customStore
34
39
* @param $defaultStore
@@ -57,13 +62,14 @@ public function testCacheHitOnDirectLinkToNonDefaultStoreView(
57
62
->method ('getValue ' )
58
63
->with (StoreManagerInterface::CONTEXT_STORE )
59
64
->willReturn (null );
65
+
60
66
$ websiteMock = $ this ->createPartialMock (
61
67
Website::class,
62
68
['getDefaultStore ' , '__wakeup ' ]
63
69
);
64
70
65
71
$ plugin = (new ObjectManager ($ this ))->getObject (
66
- \ Magento \ Store \ App \ Action \ Plugin \ Context::class,
72
+ Context::class,
67
73
[
68
74
'session ' => $ sessionMock ,
69
75
'httpContext ' => $ httpContextMock ,
0 commit comments