Skip to content

Commit 49efcb1

Browse files
committed
MC-19260: Coupon code removed during tax/shipping calculation on checkout
1 parent 90fd6d3 commit 49efcb1

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
* Tests for Magento\SalesRule\Model\Rule\Action\Discount\CartFixed.
2828
*
2929
* @magentoAppArea frontend
30+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
3031
*/
3132
class CartFixedTest extends \PHPUnit\Framework\TestCase
3233
{

dev/tests/integration/testsuite/Magento/SalesRule/_files/coupon_cart_fixed_subtotal_with_discount.php

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,25 @@
1111
use Magento\SalesRule\Model\Rule\Condition\Address;
1212
use Magento\SalesRule\Model\Rule\Condition\Combine;
1313

14-
$salesRule->getConditions()->loadArray([
15-
'type' => Combine::class,
16-
'attribute' => null,
17-
'operator' => null,
18-
'value' => '1',
19-
'is_value_processed' => null,
20-
'aggregator' => 'any',
21-
'conditions' =>
22-
[
14+
$salesRule->getConditions()->loadArray(
15+
[
16+
'type' => Combine::class,
17+
'attribute' => null,
18+
'operator' => null,
19+
'value' => '1',
20+
'is_value_processed' => null,
21+
'aggregator' => 'any',
22+
'conditions' =>
2323
[
24-
'type' => Address::class,
25-
'attribute' => 'base_subtotal_with_discount',
26-
'operator' => '>=',
27-
'value' => 9,
28-
'is_value_processed' => false
24+
[
25+
'type' => Address::class,
26+
'attribute' => 'base_subtotal_with_discount',
27+
'operator' => '>=',
28+
'value' => 9,
29+
'is_value_processed' => false
30+
],
2931
],
30-
],
31-
]);
32+
]
33+
);
3234
$salesRule->setDiscountAmount(5);
3335
$objectManager->get(ResourceModel::class)->save($salesRule);

dev/tests/integration/testsuite/Magento/SalesRule/_files/coupon_cart_fixed_subtotal_with_discount_rollback.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
*/
66
declare(strict_types=1);
77

8-
include __DIR__ . '/coupon_cart_fixed_discount_rollback.php';
8+
include __DIR__ . '/coupon_cart_fixed_discount_rollback.php';

0 commit comments

Comments
 (0)