Skip to content

Commit 33b4766

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 40bd08e commit 33b4766

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
namespace Magento\SalesRule\Test\Unit\Model\Plugin;
2020

21-
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
2221
use Magento\Quote\Model\Quote;
2322
use Magento\Quote\Model\QuoteRepository;
2423
use PHPUnit\Framework\MockObject\MockObject;
@@ -60,7 +59,6 @@ class CouponUsageIncreamentForMultishippingTest extends TestCase
6059
*/
6160
protected function setUp(): void
6261
{
63-
$this->objectManagerHelper = new ObjectManagerHelper($this);
6462
$this->subjectMock = $this->getMockBuilder(PlaceOrderDefault::class)
6563
->disableOriginalConstructor()
6664
->getMock();
@@ -75,12 +73,9 @@ protected function setUp(): void
7573
->onlyMethods(['getQuoteId'])
7674
->disableOriginalConstructor()
7775
->getMock();
78-
$this->plugin = $this->objectManagerHelper->getObject(
79-
CouponUsagesIncrementMultishipping::class,
80-
[
81-
'updateCouponUsages' => $this->updateCouponUsagesMock,
82-
'quoteRepository' => $this->quoteRepositoryMock
83-
]
76+
$this->plugin = new CouponUsagesIncrementMultishipping(
77+
$this->updateCouponUsagesMock,
78+
$this->quoteRepositoryMock
8479
);
8580
}
8681
/**

app/code/Magento/SalesRule/etc/module.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<module name="Magento_Catalog"/>
1313
<module name="Magento_Sales"/>
1414
<module name="Magento_Quote"/>
15+
<module name="Magento_Multishipping"/>
1516
</sequence>
1617
</module>
1718
</config>

0 commit comments

Comments
 (0)