Skip to content

Commit c377e84

Browse files
committed
MAGETWO-45311: Remove dependency on Website for Cataloginventory
- Fixed unit tests
1 parent 147287d commit c377e84

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/code/Magento/CatalogInventory/Test/Unit/Api/StockRegistryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected function setUp()
8282
false
8383
);
8484
$this->stockItem = $this->getMockBuilder('Magento\CatalogInventory\Api\Data\StockItemInterface')
85-
->setMethods(['setProductId', 'getData', 'addData', 'getItemId'])
85+
->setMethods(['setProductId', 'getData', 'addData', 'getItemId', 'getWebsiteId'])
8686
->disableOriginalConstructor()
8787
->getMockForAbstractClass();
8888
$this->stockStatus = $this->getMockForAbstractClass(

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ public function setUp()
7575
$this->closureMock = function () {
7676
return $this->savedProductMock;
7777
};
78-
$this->stockItemMock = $this->getMock('\Magento\CatalogInventory\Api\Data\StockItemInterface');
78+
$this->stockItemMock = $this->getMockBuilder('Magento\CatalogInventory\Api\Data\StockItemInterface')
79+
->setMethods(['setWebsiteId', 'getWebsiteId'])
80+
->getMockForAbstractClass();
7981
}
8082

8183
public function testAroundSaveWhenProductHasNoStockItemNeedingToBeUpdated()

0 commit comments

Comments
 (0)