1919namespace Magento \SalesRule \Test \Unit \Plugin ;
2020
2121use Magento \Quote \Model \Quote ;
22- use Magento \Quote \Model \ QuoteRepository ;
22+ use Magento \Quote \Api \ CartRepositoryInterface ;
2323use PHPUnit \Framework \MockObject \MockObject ;
2424use PHPUnit \Framework \TestCase ;
2525use 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