Skip to content

Commit b7f79fb

Browse files
committed
MAGETWO-90144: [Forwardport] Fixed amount discount for whole cart applying an extra cent to the discount amount for
1 parent 18148e8 commit b7f79fb

File tree

2 files changed

+3
-3
lines changed
  • app/code/Magento/SalesRule/Model/Rule/Action/Discount
  • dev/tests/integration/testsuite/Magento/SalesRule/Model/Rule/Action/Discount

2 files changed

+3
-3
lines changed

app/code/Magento/SalesRule/Model/Rule/Action/Discount/CartFixed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ public function __construct(
4242
Validator $validator,
4343
DataFactory $discountDataFactory,
4444
PriceCurrencyInterface $priceCurrency,
45-
DeltaPriceRound $deltaPriceRound = null
45+
DeltaPriceRound $deltaPriceRound
4646
) {
47-
$this->deltaPriceRound = $deltaPriceRound ?: ObjectManager::getInstance()->get(DeltaPriceRound::class);
47+
$this->deltaPriceRound = $deltaPriceRound;
4848

4949
parent::__construct($validator, $discountDataFactory, $priceCurrency);
5050
}

dev/tests/integration/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ private function createProduct(float $price): ProductInterface
105105
$productRepository = Bootstrap::getObjectManager()->get(ProductRepository::class);
106106
$product = Bootstrap::getObjectManager()->create(Product::class);
107107
$product->setTypeId('simple')
108-
->setAttributeSetId(4)
108+
->setAttributeSetId($product->getDefaultAttributeSetId())
109109
->setWebsiteIds([1])
110110
->setName($name)
111111
->setSku(uniqid($name))

0 commit comments

Comments
 (0)