Skip to content

Commit 9e53fb1

Browse files
committed
ACP2E-10: Incorrect Discount: Two Cart rules with and without coupon
1 parent d85fbc1 commit 9e53fb1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/code/Magento/SalesRule/Model/Validator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class Validator extends \Magento\Framework\Model\AbstractModel
5959
protected $_skipActionsValidation = false;
6060

6161
/**
62-
* Catalog data
62+
* Catalog data helper
6363
*
6464
* @var \Magento\Catalog\Helper\Data|null
6565
*/

app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,13 @@ public function testCollectItemHasParent()
231231
{
232232
$itemWithParentId = $this->getMockBuilder(Item::class)
233233
->addMethods(['getNoDiscount'])
234-
->onlyMethods(['getParentItem', 'getId'])
234+
->onlyMethods(['getParentItem', 'getId', 'getExtensionAttributes'])
235235
->disableOriginalConstructor()
236236
->getMock();
237237
$itemWithParentId->expects($this->once())->method('getNoDiscount')->willReturn(false);
238238
$itemWithParentId->expects($this->any())->method('getId')->willReturn(1);
239239
$itemWithParentId->expects($this->any())->method('getParentItem')->willReturn(true);
240+
$itemWithParentId->expects($this->any())->method('getExtensionAttributes')->willReturn(false);
240241

241242
$this->validatorMock->expects($this->any())->method('canApplyDiscount')->willReturn(true);
242243
$this->validatorMock->expects($this->any())->method('sortItemsByPriority')

0 commit comments

Comments
 (0)