File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
lib/internal/Magento/Framework/View
Test/Unit/Element/Html/Link Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ private function getMca()
71
71
];
72
72
73
73
$ parts = [];
74
- $ pathParts = explode ('/ ' , $ this ->getPath ( ));
74
+ $ pathParts = explode ('/ ' , trim ( $ this ->_request -> getPathInfo (), ' / ' ));
75
75
foreach ($ routeParts as $ key => $ value ) {
76
76
if (isset ($ pathParts [$ key ]) && $ pathParts [$ key ] === $ value ) {
77
77
$ parts [] = $ value ;
Original file line number Diff line number Diff line change @@ -64,6 +64,9 @@ public function testIsCurrent()
64
64
$ path = 'test/index ' ;
65
65
$ url = 'http://example.com/test/index ' ;
66
66
67
+ $ this ->_requestMock ->expects ($ this ->once ())
68
+ ->method ('getPathInfo ' )
69
+ ->will ($ this ->returnValue ('/test/index/ ' ));
67
70
$ this ->_requestMock ->expects ($ this ->once ())
68
71
->method ('getModuleName ' )
69
72
->will ($ this ->returnValue ('test ' ));
You can’t perform that action at this time.
0 commit comments