File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
app/code/Magento/Downloadable/Test/Unit/Model/Plugin Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,8 @@ protected function setUp()
49
49
$ this ->productMock = $ this ->getMockBuilder ('\Magento\Catalog\Model\Product ' )
50
50
->disableOriginalConstructor ()
51
51
->getMock ();
52
- $ this ->productExtensionMock = $ this ->getMock ('\Magento\Catalog\Api\Data\ProductExtensionInterface ' );
52
+ $ this ->productExtensionMock = $ this ->getMockBuilder ('\Magento\Catalog\Api\Data\ProductExtension ' )
53
+ ->setMethods (['setDownloadableProductLinks ' , 'setDownloadableProductSamples ' ])->getMock ();
53
54
}
54
55
55
56
public function testAfterLoad ()
Original file line number Diff line number Diff line change @@ -71,8 +71,11 @@ protected function setUp()
71
71
$ this ->model = new AroundProductRepositorySave (
72
72
$ this ->linkRepositoryMock ,
73
73
$ this ->sampleRepositoryMock );
74
- $ this ->productExtensionMock = $ this ->getMock ('Magento\Catalog\Api\Data\ProductExtensionInterface ' );
75
- $ this ->existingProductExtensionMock = $ this ->getMock ('Magento\Catalog\Api\Data\ProductExtensionInterface ' );
74
+ $ this ->productExtensionMock = $ this ->getMockBuilder ('Magento\Catalog\Api\Data\ProductExtension ' )
75
+ ->setMethods (['getDownloadableProductLinks ' , 'getDownloadableProductSamples ' ])->getMock ();
76
+ $ this ->existingProductExtensionMock = $ this ->getMockBuilder ('Magento\Catalog\Api\Data\ProductExtension ' )
77
+ ->setMethods (['getDownloadableProductLinks ' , 'getDownloadableProductSamples ' ])
78
+ ->getMock ();
76
79
}
77
80
78
81
public function testAroundSaveWhenProductIsSimple ()
You can’t perform that action at this time.
0 commit comments