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
248248 ->method ('getVaryString ' )
249249 ->willReturn (self ::VARY );
250250
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+
251257 $ this ->identifierStoreReader ->method ('getPageTagsWithStoreCacheTags ' )->willReturnCallback (
252258 function ($ value ) {
253259 return $ value ;
254260 }
255261 );
256-
257262 $ this ->assertEquals (
258263 sha1 (
259264 json_encode (
260265 [
261266 true ,
262- 'http://example.com/path1/?abc=123 ' ,
267+ 'http://example.com/path1/ ' ,
268+ 'abc=123 ' ,
263269 self ::VARY
264270 ]
265271 )
Original file line number Diff line number Diff line change @@ -321,12 +321,19 @@ public function testGetValueWithMarketingParameters(): void
321321 ->method ('getVaryString ' )
322322 ->willReturn (self ::VARY );
323323
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+
324330 $ this ->assertEquals (
325331 sha1 (
326332 json_encode (
327333 [
328334 true ,
329- 'http://example.com/path1/?abc=123 ' ,
335+ 'http://example.com/path1/ ' ,
336+ 'abc=123 ' ,
330337 self ::VARY
331338 ]
332339 )
You can’t perform that action at this time.
0 commit comments