@@ -53,11 +53,14 @@ protected function setUp() : void
53
53
->disableOriginalConstructor ()
54
54
->getMockForAbstractClass ();
55
55
56
+ $ escaper = $ this ->getObjectManager ()->getObject (\Magento \Framework \Escaper::class);
57
+
56
58
$ this ->viewModel = $ this ->getObjectManager ()->getObject (
57
59
Breadcrumbs::class,
58
60
[
59
61
'catalogData ' => $ this ->catalogHelper ,
60
62
'scopeConfig ' => $ this ->scopeConfig ,
63
+ 'escaper ' => $ escaper
61
64
]
62
65
);
63
66
}
@@ -154,16 +157,16 @@ public function productJsonEncodeDataProvider() : array
154
157
],
155
158
[
156
159
$ this ->getObjectManager ()->getObject (Product::class, ['data ' => ['name ' => 'Test " ' ]]),
157
- '{"breadcrumbs":{"categoryUrlSuffix":".\"html","userCategoryPathInUrl":0,"product":"Test \" "}} ' ,
160
+ '{"breadcrumbs":{"categoryUrlSuffix":".\"html","userCategoryPathInUrl":0,"product":"Test " "}} ' ,
158
161
],
159
162
[
160
163
$ this ->getObjectManager ()->getObject (Product::class, ['data ' => ['name ' => 'Test <b>x</b> ' ]]),
161
164
'{"breadcrumbs":{"categoryUrlSuffix":".\"html","userCategoryPathInUrl":0,"product": '
162
- . '"Test \u003Cb\u003Ex\u003C\/b\u003E "}} ' ,
165
+ . '"Test <b>x<\/b> "}} ' ,
163
166
],
164
167
[
165
168
$ this ->getObjectManager ()->getObject (Product::class, ['data ' => ['name ' => 'Test \'abc \'' ]]),
166
- '{"breadcrumbs":{"categoryUrlSuffix":".\"html","userCategoryPathInUrl":0,"product":"Test \' abc \' "}} '
169
+ '{"breadcrumbs":{"categoryUrlSuffix":".\"html","userCategoryPathInUrl":0,"product":"Test ' abc' "}} '
167
170
],
168
171
];
169
172
}
0 commit comments