Skip to content

Commit 84a725e

Browse files
committed
PHPCSFixes
1 parent 63c0f53 commit 84a725e

File tree

1 file changed

+30
-19
lines changed

1 file changed

+30
-19
lines changed

app/code/Magento/PageCache/Test/Unit/App/CacheIdentifierPluginTest.php

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
namespace Magento\PageCache\Test\Unit\App;
77

88
use Magento\PageCache\Model\Config;
9-
use Magento\Store\Model\Store;
109
use Magento\Store\Model\StoreManager;
1110

1211
/**
@@ -96,10 +95,18 @@ public function afterGetValueDataProvider()
9695
'Varnish + PageCache enabled' => [Config::VARNISH, true, null, false, false],
9796
'Built-in + PageCache disabled' => [Config::BUILT_IN, false, null, false, false],
9897
'Built-in + PageCache enabled' => [Config::BUILT_IN, true, null, false, false],
99-
'Built-in, PageCache enabled, no user-agent exceptions' =>
100-
[Config::BUILT_IN, true, 'aa123aa', false, 'aa123aa'],
101-
'Built-in, PageCache enabled, with design exception' =>
102-
[Config::BUILT_IN, true, 'aa123aa', '7', 'DESIGN=7|aa123aa']
98+
'Built-in, PageCache enabled, no user-agent exceptions' => [Config::BUILT_IN,
99+
true,
100+
'aa123aa',
101+
false,
102+
'aa123aa'
103+
],
104+
'Built-in, PageCache enabled, with design exception' => [Config::BUILT_IN,
105+
true,
106+
'aa123aa',
107+
'7',
108+
'DESIGN=7|aa123aa'
109+
]
103110
];
104111
}
105112

@@ -121,14 +128,16 @@ public function testAfterGetValueRunParamsCauseDifferentIdentifiers()
121128
$defaultRequestMock = clone $this->requestMock;
122129
$defaultRequestMock->expects($this->any())
123130
->method('getServerValue')
124-
->willReturnCallback(function ($param) {
125-
if ($param == StoreManager::PARAM_RUN_TYPE) {
126-
return 'store';
131+
->willReturnCallback(
132+
function ($param) {
133+
if ($param == StoreManager::PARAM_RUN_TYPE) {
134+
return 'store';
135+
}
136+
if ($param == StoreManager::PARAM_RUN_CODE) {
137+
return 'default';
138+
}
127139
}
128-
if ($param == StoreManager::PARAM_RUN_CODE) {
129-
return 'default';
130-
}
131-
});
140+
);
132141

133142
$nullSha1 = 'da39a3ee5e6b4b0d3255bfef95601890afd80709';
134143

@@ -143,14 +152,16 @@ public function testAfterGetValueRunParamsCauseDifferentIdentifiers()
143152
$otherRequestMock = clone $this->requestMock;
144153
$otherRequestMock->expects($this->any())
145154
->method('getServerValue')
146-
->willReturnCallback(function ($param) {
147-
if ($param == StoreManager::PARAM_RUN_TYPE) {
148-
return 'store';
149-
}
150-
if ($param == StoreManager::PARAM_RUN_CODE) {
151-
return 'klingon';
155+
->willReturnCallback(
156+
function ($param) {
157+
if ($param == StoreManager::PARAM_RUN_TYPE) {
158+
return 'store';
159+
}
160+
if ($param == StoreManager::PARAM_RUN_CODE) {
161+
return 'klingon';
162+
}
152163
}
153-
});
164+
);
154165

155166
$otherPlugin = new \Magento\PageCache\Model\App\CacheIdentifierPlugin(
156167
$this->designExceptionsMock,

0 commit comments

Comments
 (0)