Skip to content

Commit 41abde5

Browse files
author
Mike Bijnsdorp
committed
Update unit test to include a dataprovider for option label
1 parent 4bb1097 commit 41abde5

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/OptionManagementTest.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,14 @@ protected function setUp(): void
5959

6060
/**
6161
* Test to add attribute option
62+
*
63+
* @dataProvider optionLabelDataProvider
6264
*/
63-
public function testAdd()
65+
public function testAdd($label)
6466
{
6567
$entityType = 42;
6668
$storeId = 4;
6769
$attributeCode = 'atrCde';
68-
$label = 'optionLabel';
6970
$storeLabel = 'labelLabel';
7071
$sortOder = 'optionSortOrder';
7172
$option = [
@@ -121,6 +122,17 @@ public function testAdd()
121122
);
122123
}
123124

125+
/**
126+
* @return array
127+
*/
128+
public function optionLabelDataProvider(): array
129+
{
130+
return [
131+
['optionLabel'],
132+
['0']
133+
];
134+
}
135+
124136
/**
125137
* Test to add attribute option with empty attribute code
126138
*/

0 commit comments

Comments
 (0)