Skip to content

Commit 0c069a2

Browse files
committed
8011: Strip Tags from attribute.
1 parent 59cedcd commit 0c069a2

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

dev/tests/integration/testsuite/Magento/Rule/Model/Condition/Product/AbstractProductTest.php

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -69,27 +69,15 @@ protected function setUp()
6969
*
7070
* @magentoDataFixture Magento/Rule/_files/dropdown_attribute_with_html.php
7171
*/
72-
public function test()
72+
public function testGetValueSelectOptions()
7373
{
74-
$expectedOptions = [
75-
[
76-
'label' => ' ',
77-
'value' => '',
78-
],
79-
[
80-
'value' => '4',
81-
'label' => 'Option 1',
82-
],
83-
[
84-
'value' => '5',
85-
'label' => 'Option 2',
86-
],
87-
[
88-
'value' => '6',
89-
'label' => 'Option 3',
90-
],
91-
];
74+
$expectedLabels = [' ', 'Option 1', 'Option 2', 'Option 3'];
9275
$this->model->setAttribute('dropdown_attribute_with_html');
93-
self::assertSame($expectedOptions, $this->model->getValueSelectOptions());
76+
$options = $this->model->getValueSelectOptions();
77+
$labels = [];
78+
foreach ($options as $option) {
79+
$labels[] = $option['label'];
80+
}
81+
self::assertSame($expectedLabels, $labels);
9482
}
9583
}

0 commit comments

Comments
 (0)