Skip to content

Commit 6fb165c

Browse files
committed
Merge remote-tracking branch 'tango-ce/MAGETWO-52343' into MAGETWO-52779
2 parents 6de5f90 + 8671083 commit 6fb165c

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

lib/internal/Magento/Framework/View/Layout/Generator/Container.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,6 @@ public function generateContainer(
8484
$elementName,
8585
$options
8686
) {
87-
$structure->setAttribute(
88-
$elementName,
89-
Layout\Element::CONTAINER_OPT_LABEL,
90-
$options[Layout\Element::CONTAINER_OPT_LABEL]
91-
);
92-
unset($options[Layout\Element::CONTAINER_OPT_LABEL]);
9387
unset($options['type']);
9488

9589
$this->validateOptions($options);

lib/internal/Magento/Framework/View/Test/Unit/Layout/Generator/ContainerTest.php

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,26 @@ public function processDataProvider()
116116
['first_container', Container::CONTAINER_OPT_HTML_ID, 'dd_id'],
117117
],
118118
'setAttributeCalls' => 4,
119+
],
120+
'sample_data2' => [
121+
'structureElements' => [
122+
'first_container' => [
123+
'container',
124+
[
125+
'attributes' => [
126+
Container::CONTAINER_OPT_HTML_TAG => 'dd',
127+
Container::CONTAINER_OPT_HTML_CLASS => 'dd_class',
128+
Container::CONTAINER_OPT_HTML_ID => 'dd_id',
129+
]
130+
],
131+
],
132+
],
133+
'setAttributeData' => [
134+
['first_container', Container::CONTAINER_OPT_HTML_TAG, 'dd'],
135+
['first_container', Container::CONTAINER_OPT_HTML_CLASS, 'dd_class'],
136+
['first_container', Container::CONTAINER_OPT_HTML_ID, 'dd_id'],
137+
],
138+
'setAttributeCalls' => 3,
119139
]
120140
];
121141
}
@@ -132,7 +152,7 @@ public function testProcessWithException($structureElements)
132152
->method('getElements')
133153
->willReturn($structureElements);
134154

135-
$this->structureMock->expects($this->once())
155+
$this->structureMock->expects($this->never())
136156
->method('setAttribute')
137157
->willReturnSelf();
138158

0 commit comments

Comments
 (0)