File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
app/code/Magento/UrlRewrite/Controller
dev/tests/unit/testsuite/Magento/UrlRewrite/Controller Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ public function match(\Magento\Framework\App\RequestInterface $request)
85
85
return $ this ->processRedirect ($ request , $ rewrite );
86
86
}
87
87
88
+ $ request ->setAlias (\Magento \Framework \UrlInterface::REWRITE_REQUEST_PATH_ALIAS , $ rewrite ->getRequestPath ());
88
89
$ request ->setPathInfo ('/ ' . $ rewrite ->getTargetPath ());
89
90
return $ this ->actionFactory ->create ('Magento\Framework\App\Action\Forward ' , ['request ' => $ request ]);
90
91
}
Original file line number Diff line number Diff line change @@ -252,8 +252,11 @@ public function testMatch()
252
252
->disableOriginalConstructor ()->getMock ();
253
253
$ urlRewrite ->expects ($ this ->any ())->method ('getRedirectType ' )->will ($ this ->returnValue (0 ));
254
254
$ urlRewrite ->expects ($ this ->any ())->method ('getTargetPath ' )->will ($ this ->returnValue ('target-path ' ));
255
+ $ urlRewrite ->expects ($ this ->any ())->method ('getRequestPath ' )->will ($ this ->returnValue ('request-path ' ));
255
256
$ this ->urlFinder ->expects ($ this ->any ())->method ('findOneByData ' )->will ($ this ->returnValue ($ urlRewrite ));
256
257
$ this ->request ->expects ($ this ->once ())->method ('setPathInfo ' )->with ('/target-path ' );
258
+ $ this ->request ->expects ($ this ->once ())->method ('setAlias ' )
259
+ ->with (\Magento \Framework \UrlInterface::REWRITE_REQUEST_PATH_ALIAS , 'request-path ' );
257
260
$ this ->actionFactory ->expects ($ this ->once ())->method ('create ' )
258
261
->with ('Magento\Framework\App\Action\Forward ' , ['request ' => $ this ->request ]);
259
262
You can’t perform that action at this time.
0 commit comments