Skip to content

Commit dd274a8

Browse files
committed
MC-18761: Fix incorrect website name rendering
1 parent 6f4228a commit dd274a8

File tree

3 files changed

+29
-26
lines changed

3 files changed

+29
-26
lines changed

app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/Column/Cms/OptionsTest.php

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function testToOptionArray()
7171
$expectedOptions = [
7272
[
7373
'label' => __('All Store Views'),
74-
'value' => '0'
74+
'value' => '0',
7575
],
7676
[
7777
'label' => 'Main Website',
@@ -81,11 +81,14 @@ public function testToOptionArray()
8181
'value' => [
8282
[
8383
'label' => ' Default Store View',
84-
'value' => '1'
84+
'value' => '1',
85+
'__disableTmpl' => true,
8586
]
86-
]
87+
],
88+
'__disableTmpl' => true,
8789
]
88-
]
90+
],
91+
'__disableTmpl' => true,
8992
]
9093
];
9194

@@ -104,14 +107,6 @@ public function testToOptionArray()
104107
$this->storeMock->expects($this->atLeastOnce())->method('getName')->willReturn('Default Store View');
105108
$this->storeMock->expects($this->atLeastOnce())->method('getId')->willReturn('1');
106109

107-
$this->escaperMock->expects($this->atLeastOnce())->method('escapeHtml')->willReturnMap(
108-
[
109-
['Default Store View', null, 'Default Store View'],
110-
['Main Website Store', null, 'Main Website Store'],
111-
['Main Website', null, 'Main Website']
112-
]
113-
);
114-
115110
$this->assertEquals($expectedOptions, $this->options->toOptionArray());
116111
}
117112
}

dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Catalog/Edit/FormTest.php

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,11 @@ public static function getEntityStoresDataProvider()
239239
['label' => 'Main Website', 'value' => [], '__disableTmpl' => true],
240240
[
241241
'label' => '    Main Website Store',
242-
'value' => [['label' => '    Default Store View', 'value' => 1]],
243-
'__disableTmpl' => true
244-
]
242+
'value' => [
243+
['label' => '    Default Store View', 'value' => 1, '__disableTmpl' => true],
244+
],
245+
'__disableTmpl' => true,
246+
],
245247
],
246248
],
247249
[
@@ -251,10 +253,12 @@ public static function getEntityStoresDataProvider()
251253
['label' => 'Main Website', 'value' => [], '__disableTmpl' => true],
252254
[
253255
'label' => '    Main Website Store',
254-
'value' => [['label' => '    Default Store View', 'value' => 1]],
255-
'__disableTmpl' => true
256-
]
257-
]
256+
'value' => [
257+
['label' => '    Default Store View', 'value' => 1, '__disableTmpl' => true],
258+
],
259+
'__disableTmpl' => true,
260+
],
261+
],
258262
],
259263
[
260264
['entity_id' => 2, 'name' => 'product2', 'url_key' => 'product2', 'store_ids' => [1]],
@@ -263,11 +267,13 @@ public static function getEntityStoresDataProvider()
263267
['label' => 'Main Website', 'value' => [], '__disableTmpl' => true],
264268
[
265269
'label' => '    Main Website Store',
266-
'value' => [['label' => '    Default Store View', 'value' => 1]],
267-
'__disableTmpl' => true
268-
]
269-
]
270-
]
270+
'value' => [
271+
['label' => '    Default Store View', 'value' => 1, '__disableTmpl' => true],
272+
],
273+
'__disableTmpl' => true,
274+
],
275+
],
276+
],
271277
];
272278
}
273279
}

dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Cms/Page/Edit/FormTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ public function testGetEntityStores()
8181
['label' => 'Main Website', 'value' => [], '__disableTmpl' => true],
8282
[
8383
'label' => '    Main Website Store',
84-
'value' => [['label' => '    Default Store View', 'value' => 1]],
85-
'__disableTmpl' => true
84+
'value' => [
85+
['label' => '    Default Store View', 'value' => 1, '__disableTmpl' => true]
86+
],
87+
'__disableTmpl' => true,
8688
],
8789
];
8890
$this->assertEquals($expectedStores, $form->getElement('store_id')->getValues());

0 commit comments

Comments
 (0)