@@ -262,16 +262,12 @@ public function testSave($attributeCode, $attributeSetId, $productData, $product
262
262
);
263
263
264
264
$ backendModel ->setAttribute ($ attribute );
265
-
266
265
$ attribute ->expects ($ this ->any ())->method ('getBackend ' )->will ($ this ->returnValue ($ backendModel ));
267
266
$ attribute ->setId (222 );
268
-
269
267
$ attributes [$ attributeCode ] = $ attribute ;
270
-
271
268
$ eavConfig = $ this ->getMockBuilder ('Magento\Eav\Model\Config ' )
272
269
->disableOriginalConstructor ()
273
270
->getMock ();
274
-
275
271
$ objectManager = new ObjectManager ($ this );
276
272
$ this ->eavConfig = $ this ->getMock ('Magento\Eav\Model\Config ' , [], [], '' , false );
277
273
$ arguments = $ objectManager ->getConstructArguments (
@@ -285,13 +281,11 @@ public function testSave($attributeCode, $attributeSetId, $productData, $product
285
281
]
286
282
]
287
283
);
288
-
289
284
/** @var $model \Magento\Framework\Model\AbstractModel|\PHPUnit_Framework_MockObject_MockObject */
290
285
$ model = $ this ->getMockBuilder ('Magento\Eav\Model\Entity\AbstractEntity ' )
291
286
->setConstructorArgs ($ arguments )
292
287
->setMethods (['_getValue ' , 'beginTransaction ' , 'commit ' , 'rollback ' ])
293
288
->getMock ();
294
-
295
289
$ model ->expects ($ this ->any ())->method ('_getValue ' )->will ($ this ->returnValue ($ eavConfig ));
296
290
$ eavConfig ->expects ($ this ->any ())->method ('getAttribute ' )->will (
297
291
$ this ->returnCallback (
@@ -300,10 +294,8 @@ function ($entityType, $attributeCode) use ($attributes) {
300
294
}
301
295
)
302
296
);
303
-
304
297
$ model ->setConnection ($ this ->_getAdapterMock ());
305
298
$ model ->isPartialSave (true );
306
-
307
299
$ model ->save ($ object );
308
300
}
309
301
0 commit comments