Skip to content

Commit

Permalink
8011: Strip Tags from attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmalevanec committed Dec 6, 2017
1 parent 59cedcd commit 0c069a2
Showing 1 changed file with 8 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,27 +69,15 @@ protected function setUp()
*
* @magentoDataFixture Magento/Rule/_files/dropdown_attribute_with_html.php
*/
public function test()
public function testGetValueSelectOptions()
{
$expectedOptions = [
[
'label' => ' ',
'value' => '',
],
[
'value' => '4',
'label' => 'Option 1',
],
[
'value' => '5',
'label' => 'Option 2',
],
[
'value' => '6',
'label' => 'Option 3',
],
];
$expectedLabels = [' ', 'Option 1', 'Option 2', 'Option 3'];
$this->model->setAttribute('dropdown_attribute_with_html');
self::assertSame($expectedOptions, $this->model->getValueSelectOptions());
$options = $this->model->getValueSelectOptions();
$labels = [];
foreach ($options as $option) {
$labels[] = $option['label'];
}
self::assertSame($expectedLabels, $labels);
}
}

0 comments on commit 0c069a2

Please sign in to comment.