Skip to content

Commit 8fa4fd6

Browse files
author
Yu Tang
committed
MAGETWO-28253: Downloadable Integration API
- Fix build error
1 parent 7fc8305 commit 8fa4fd6

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

app/code/Magento/Downloadable/Test/Unit/Model/Plugin/AfterProductLoadTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ protected function setUp()
4949
$this->productMock = $this->getMockBuilder('\Magento\Catalog\Model\Product')
5050
->disableOriginalConstructor()
5151
->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();
5354
}
5455

5556
public function testAfterLoad()

app/code/Magento/Downloadable/Test/Unit/Model/Plugin/AroundProductRepositorySaveTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,11 @@ protected function setUp()
7171
$this->model = new AroundProductRepositorySave(
7272
$this->linkRepositoryMock,
7373
$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();
7679
}
7780

7881
public function testAroundSaveWhenProductIsSimple()

0 commit comments

Comments
 (0)