File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
app/code/Magento/PageCache/Test/Unit/Model/App/Request/Http
lib/internal/Magento/Framework/App/Test/Unit/PageCache Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -248,18 +248,24 @@ public function testGetValueWithMarketingParameters(): void
248
248
->method ('getVaryString ' )
249
249
->willReturn (self ::VARY );
250
250
251
+ $ uri = $ this ->createMock (HttpUri::class);
252
+ $ uri ->expects ($ this ->any ())->method ('getQueryAsArray ' )->willReturn (['abc ' => '123 ' ]);
253
+ $ this ->requestMock ->expects ($ this ->any ())
254
+ ->method ('getUri ' )
255
+ ->willReturn ($ uri );
256
+
251
257
$ this ->identifierStoreReader ->method ('getPageTagsWithStoreCacheTags ' )->willReturnCallback (
252
258
function ($ value ) {
253
259
return $ value ;
254
260
}
255
261
);
256
-
257
262
$ this ->assertEquals (
258
263
sha1 (
259
264
json_encode (
260
265
[
261
266
true ,
262
- 'http://example.com/path1/?abc=123 ' ,
267
+ 'http://example.com/path1/ ' ,
268
+ 'abc=123 ' ,
263
269
self ::VARY
264
270
]
265
271
)
Original file line number Diff line number Diff line change @@ -321,12 +321,19 @@ public function testGetValueWithMarketingParameters(): void
321
321
->method ('getVaryString ' )
322
322
->willReturn (self ::VARY );
323
323
324
+ $ uri = $ this ->createMock (HttpUri::class);
325
+ $ uri ->expects ($ this ->any ())->method ('getQueryAsArray ' )->willReturn (['abc ' => '123 ' ]);
326
+ $ this ->requestMock ->expects ($ this ->any ())
327
+ ->method ('getUri ' )
328
+ ->willReturn ($ uri );
329
+
324
330
$ this ->assertEquals (
325
331
sha1 (
326
332
json_encode (
327
333
[
328
334
true ,
329
- 'http://example.com/path1/?abc=123 ' ,
335
+ 'http://example.com/path1/ ' ,
336
+ 'abc=123 ' ,
330
337
self ::VARY
331
338
]
332
339
)
You can’t perform that action at this time.
0 commit comments