File tree 1 file changed +11
-2
lines changed
app/code/Magento/ConfigurableProduct/Test/Unit/Plugin/Model/ResourceModel
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,15 @@ public function testBeforeSaveConfigurable()
52
52
/** @var \Magento\Catalog\Model\ResourceModel\Product|\PHPUnit_Framework_MockObject_MockObject $subject */
53
53
$ subject = $ this ->createMock (\Magento \Catalog \Model \ResourceModel \Product::class);
54
54
/** @var \Magento\Catalog\Model\Product|\PHPUnit_Framework_MockObject_MockObject $object */
55
- $ object = $ this ->createPartialMock (\Magento \Catalog \Model \Product::class, ['getTypeId ' , 'getTypeInstance ' ]);
55
+ $ object = $ this ->createPartialMock (
56
+ \Magento \Catalog \Model \Product::class,
57
+ [
58
+ 'getTypeId ' ,
59
+ 'getTypeInstance ' ,
60
+ 'getExtensionAttributes ' ,
61
+ 'setData '
62
+ ]
63
+ );
56
64
$ type = $ this ->createPartialMock (
57
65
\Magento \ConfigurableProduct \Model \Product \Type \Configurable::class,
58
66
['getSetAttributes ' ]
@@ -61,7 +69,8 @@ public function testBeforeSaveConfigurable()
61
69
62
70
$ object ->expects ($ this ->once ())->method ('getTypeId ' )->will ($ this ->returnValue (Configurable::TYPE_CODE ));
63
71
$ object ->expects ($ this ->once ())->method ('getTypeInstance ' )->will ($ this ->returnValue ($ type ));
64
- $ object ->expects ($ this ->once ())->method ('resetConfigurableOptionsData ' )->with ($ object );
72
+ $ object ->expects ($ this ->any ())->method ('getExtensionAttributes ' );
73
+ $ object ->expects ($ this ->any ())->method ('setData ' );
65
74
66
75
$ this ->model ->beforeSave (
67
76
$ subject ,
You can’t perform that action at this time.
0 commit comments