@@ -149,7 +149,6 @@ public function testAddChild()
149
149
->disableOriginalConstructor ()
150
150
->setMethods (['getId ' , 'getData ' ])
151
151
->getMock ();
152
-
153
152
$ extensionAttributesMock = $ this ->getMockBuilder (\Magento \Catalog \Api \Data \ProductExtension::class)
154
153
->disableOriginalConstructor ()
155
154
->setMethods (
@@ -193,7 +192,6 @@ public function testAddChild()
193
192
->disableOriginalConstructor ()
194
193
->setMethods (['getValue ' , 'getLabel ' ])
195
194
->getMock ();
196
-
197
195
$ attributeCollectionMock = $ this ->getMockBuilder (
198
196
\Magento \ConfigurableProduct \Model \ResourceModel \Product \Type \Configurable \Attribute \Collection::class
199
197
)
@@ -227,15 +225,11 @@ public function testAddChild()
227
225
$ attributeMock ->expects ($ this ->any ())->method ('getCollection ' )->willReturn ($ attributeCollectionMock );
228
226
$ attributeCollectionMock ->expects ($ this ->any ())->method ('addFieldToFilter ' )->willReturnSelf ();
229
227
$ attributeCollectionMock ->expects ($ this ->any ())->method ('getItems ' )->willReturn ([$ attributeMock ]);
230
-
231
228
$ attributeMock ->expects ($ this ->any ())->method ('getId ' )->willReturn (1 );
232
229
$ attributeMock ->expects ($ this ->any ())->method ('getOptions ' )->willReturn ([$ attributeOptionMock ]);
233
-
234
230
$ extensionAttributesMock ->expects ($ this ->any ())->method ('setConfigurableProductOptions ' );
235
231
$ extensionAttributesMock ->expects ($ this ->any ())->method ('setConfigurableProductLinks ' );
236
-
237
232
$ this ->productRepository ->expects ($ this ->once ())->method ('save ' );
238
-
239
233
$ this ->assertTrue (true , $ this ->object ->addChild ($ productSku , $ childSku ));
240
234
}
241
235
0 commit comments