Skip to content

Commit 549852f

Browse files
author
Oleksii Korshenko
authored
Merge pull request #601 from magento-okapis/MAGETWO-59449-Stock-Decrement-No-Upgrade
[Okapis] MAGETWO-59449: Stock decrements in multi-website doesn't work - 2.0.11
2 parents 21468d1 + 8c00b81 commit 549852f

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

app/code/Magento/CatalogInventory/Model/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function __construct(
148148
*/
149149
public function getDefaultScopeId()
150150
{
151-
return (int) $this->storeManager->getWebsite()->getId();
151+
return 1;
152152
}
153153

154154
/**

app/code/Magento/CatalogInventory/Test/Unit/Model/ConfigurationTest.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,9 @@ protected function setUp()
5959
);
6060
}
6161

62-
public function testGetDefaultWebsiteId()
62+
public function testGetDefaultScopeId()
6363
{
6464
$id = 1;
65-
$websiteMock = $this->getMockBuilder('Magento\Store\Model\Website')
66-
->disableOriginalConstructor()
67-
->getMock();
68-
$websiteMock->expects($this->once())
69-
->method('getId')
70-
->willReturn($id);
71-
$this->storeManagerMock->expects($this->once())
72-
->method('getWebsite')
73-
->willReturn($websiteMock);
7465
$this->assertEquals($id, $this->model->getDefaultScopeId());
7566
}
7667

0 commit comments

Comments
 (0)