@@ -58,13 +58,13 @@ public function testAdd()
58
58
$ labelMock = $ this ->createMock (\Magento \Eav \Api \Data \AttributeOptionLabelInterface::class);
59
59
$ option =
60
60
['value ' => [
61
- 'new_option ' => [
61
+ 'id_new_option ' => [
62
62
0 => 'optionLabel ' ,
63
63
42 => 'labelLabel ' ,
64
64
],
65
65
],
66
66
'order ' => [
67
- 'new_option ' => 'optionSortOrder ' ,
67
+ 'id_new_option ' => 'optionSortOrder ' ,
68
68
],
69
69
];
70
70
@@ -77,7 +77,7 @@ public function testAdd()
77
77
$ labelMock ->expects ($ this ->once ())->method ('getStoreId ' )->willReturn (42 );
78
78
$ labelMock ->expects ($ this ->once ())->method ('getLabel ' )->willReturn ('labelLabel ' );
79
79
$ optionMock ->expects ($ this ->once ())->method ('getIsDefault ' )->willReturn (true );
80
- $ attributeMock ->expects ($ this ->once ())->method ('setDefault ' )->with (['new_option ' ]);
80
+ $ attributeMock ->expects ($ this ->once ())->method ('setDefault ' )->with (['id_new_option ' ]);
81
81
$ attributeMock ->expects ($ this ->once ())->method ('setOption ' )->with ($ option );
82
82
$ this ->resourceModelMock ->expects ($ this ->once ())->method ('save ' )->with ($ attributeMock );
83
83
$ this ->assertTrue ($ this ->model ->add ($ entityType , $ attributeCode , $ optionMock ));
@@ -166,13 +166,13 @@ public function testAddWithCannotSaveException()
166
166
$ labelMock = $ this ->createMock (\Magento \Eav \Api \Data \AttributeOptionLabelInterface::class);
167
167
$ option =
168
168
['value ' => [
169
- 'new_option ' => [
169
+ 'id_new_option ' => [
170
170
0 => 'optionLabel ' ,
171
171
42 => 'labelLabel ' ,
172
172
],
173
173
],
174
174
'order ' => [
175
- 'new_option ' => 'optionSortOrder ' ,
175
+ 'id_new_option ' => 'optionSortOrder ' ,
176
176
],
177
177
];
178
178
@@ -185,7 +185,7 @@ public function testAddWithCannotSaveException()
185
185
$ labelMock ->expects ($ this ->once ())->method ('getStoreId ' )->willReturn (42 );
186
186
$ labelMock ->expects ($ this ->once ())->method ('getLabel ' )->willReturn ('labelLabel ' );
187
187
$ optionMock ->expects ($ this ->once ())->method ('getIsDefault ' )->willReturn (true );
188
- $ attributeMock ->expects ($ this ->once ())->method ('setDefault ' )->with (['new_option ' ]);
188
+ $ attributeMock ->expects ($ this ->once ())->method ('setDefault ' )->with (['id_new_option ' ]);
189
189
$ attributeMock ->expects ($ this ->once ())->method ('setOption ' )->with ($ option );
190
190
$ this ->resourceModelMock ->expects ($ this ->once ())->method ('save ' )->with ($ attributeMock )
191
191
->willThrowException (new \Exception ());
0 commit comments