Skip to content

Commit 055b911

Browse files
Chhandak.BaruaChhandak.Barua
authored andcommitted
ACP2E-2519: The coupon code count does not update in the Time Used column in the Manage Coupon Codes tab if an order is placed with multi-shipping.
1 parent ba0d0f1 commit 055b911

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

app/code/Magento/SalesRule/Test/Unit/Plugin/CouponUsageIncreamentForMultishippingTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
namespace Magento\SalesRule\Test\Unit\Plugin;
2020

2121
use Magento\Quote\Model\Quote;
22-
use Magento\Quote\Model\QuoteRepository;
22+
use Magento\Quote\Api\CartRepositoryInterface;
2323
use PHPUnit\Framework\MockObject\MockObject;
2424
use PHPUnit\Framework\TestCase;
2525
use Magento\SalesRule\Model\Coupon\Quote\UpdateCouponUsages;
@@ -40,9 +40,9 @@ class CouponUsageIncreamentForMultishippingTest extends TestCase
4040
private $updateCouponUsagesMock;
4141

4242
/**
43-
* @var QuoteRepository|MockObject
43+
* @var CartRepositoryInterface|MockObject
4444
*/
45-
private $quoteRepositoryMock;
45+
private $cartRepositoryInterfaceMock;
4646

4747
/**
4848
* @var Order[]|MockObject
@@ -66,7 +66,7 @@ protected function setUp(): void
6666
->disableOriginalConstructor()
6767
->onlyMethods(['execute'])
6868
->getMock();
69-
$this->quoteRepositoryMock = $this->getMockBuilder(QuoteRepository::class)
69+
$this->cartRepositoryInterfaceMock = $this->getMockBuilder(CartRepositoryInterface::class)
7070
->disableOriginalConstructor()
7171
->getMock();
7272
$this->orderMock = $this->getMockBuilder(Order::class)
@@ -75,7 +75,7 @@ protected function setUp(): void
7575
->getMock();
7676
$this->plugin = new CouponUsagesIncrementMultishipping(
7777
$this->updateCouponUsagesMock,
78-
$this->quoteRepositoryMock
78+
$this->cartRepositoryInterfaceMock
7979
);
8080
}
8181
/**
@@ -96,7 +96,7 @@ public function testAroundPlace()
9696
$this->orderMock->expects($this->once())->method('getQuoteId')
9797
->willReturn(1);
9898

99-
$this->quoteRepositoryMock->expects($this->once())->method('get')->with(1)->willReturn($quoteMock);
99+
$this->cartRepositoryInterfaceMock->expects($this->once())->method('get')->with(1)->willReturn($quoteMock);
100100
$quoteMock->expects($this->once())->method('getCouponCode')->willReturn($couponCode);
101101
$quoteMock->expects($this->any())->method('dataHasChangedFor')->with($couponCode)->willReturn(true);
102102
$this->updateCouponUsagesMock

0 commit comments

Comments
 (0)