Skip to content

Commit 68a91a9

Browse files
author
Alexander Akimov
authored
Merge pull request #103 from magento-firedrakes/MAGETWO-53424
[Firedrakes] P1 bugfixes
2 parents 4b6e1da + 682e62b commit 68a91a9

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

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;

lib/internal/Magento/Framework/EntityManager/Operation/Create/CreateAttributes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function execute($entity, $arguments = [])
5656
$entityData = array_merge($hydrator->extract($entity), $arguments);
5757
$actions = $this->attributePool->getActions($entityType, 'create');
5858
foreach ($actions as $action) {
59-
$action->execute($entityType, $entityData);
59+
$action->execute($entityType, $entityData, $arguments);
6060
}
6161
$entity = $hydrator->hydrate($entity, $entityData);
6262
return $entity;

lib/internal/Magento/Framework/EntityManager/Operation/Read.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function execute($entity, $identifier, $arguments = [])
110110
'arguments' => $arguments
111111
]
112112
);
113-
$entity = $this->readMain->execute($entity, $identifier, $arguments);
113+
$entity = $this->readMain->execute($entity, $identifier);
114114
$entityData = array_merge($hydrator->extract($entity), $arguments);
115115
if (isset($entityData[$metadata->getLinkField()])) {
116116
$entity = $this->readAttributes->execute($entity, $arguments);

0 commit comments

Comments
 (0)