Skip to content

Commit 68fc426

Browse files
committed
Merge branch 'MAGETWO-53424' of github.com:magento-firedrakes/magento2ce into MAGETWO-53424
2 parents 946f1fb + cf1df1c commit 68fc426

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

app/code/Magento/Store/Model/StoreScopeProvider.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ public function getContext($entityType, $entityData = [])
5050
if (isset($entityData[Store::STORE_ID])) {
5151
$value = $entityData[Store::STORE_ID];
5252
} else {
53+
// if ($this->storeManager->hasSingleStore()) {
54+
// $value = Store::DEFAULT_STORE_ID;
55+
// } else {
56+
// $value = (int)$this->storeManager->getStore(true)->getId();
57+
// }
5358
$value = (int)$this->storeManager->getStore(true)->getId();
5459
}
5560

dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,10 @@ public function testReindexFull()
9999

100100
$this->indexerBuilder->reindexFull();
101101

102-
$this->assertEquals(9.8, $this->resourceRule->getRulePrice(new \DateTime(), 1, 1, $this->product->getId()));
103-
$this->assertEquals(
104-
9.8,
105-
$this->resourceRule->getRulePrice(new \DateTime(), 1, 1, $this->productSecond->getId())
106-
);
102+
$rulePrice = $this->resourceRule->getRulePrice(new \DateTime(), 1, 1, $this->product->getId());
103+
$this->assertEquals(9.8, $rulePrice);
104+
$rulePrice = $this->resourceRule->getRulePrice(new \DateTime(), 1, 1, $this->productSecond->getId());
105+
$this->assertEquals(9.8, $rulePrice);
107106
$this->assertFalse($this->resourceRule->getRulePrice(new \DateTime(), 1, 1, $this->productThird->getId()));
108107
}
109108

@@ -113,7 +112,7 @@ protected function prepareProducts()
113112
$product->load($product->getId());
114113
$this->product = $product;
115114

116-
$this->product->setData('test_attribute', 'test_attribute_value')->save();
115+
$this->product->setStoreId(0)->setData('test_attribute', 'test_attribute_value')->save();
117116
$this->productSecond = clone $this->product;
118117
$this->productSecond->setId(null)->setUrlKey('product-second')->save();
119118
$this->productThird = clone $this->product;

0 commit comments

Comments
 (0)