Skip to content

Commit 13f2568

Browse files
author
Spandana Chittimala
committed
Merge branch 'MAGETWO-99383' of https://github.com/magento-mpi/magento2ce into PR-2019-05-13
2 parents e4a225f + db1d77d commit 13f2568

File tree

2 files changed

+27
-22
lines changed

2 files changed

+27
-22
lines changed

app/code/Magento/Quote/Model/QuoteManagement.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -358,13 +358,15 @@ public function placeOrder($cartId, PaymentInterface $paymentMethod = null)
358358
{
359359
$quote = $this->quoteRepository->getActive($cartId);
360360
if ($paymentMethod) {
361-
$paymentMethod->setChecks([
362-
\Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_CHECKOUT,
363-
\Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_FOR_COUNTRY,
364-
\Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_FOR_CURRENCY,
365-
\Magento\Payment\Model\Method\AbstractMethod::CHECK_ORDER_TOTAL_MIN_MAX,
366-
\Magento\Payment\Model\Method\AbstractMethod::CHECK_ZERO_TOTAL,
367-
]);
361+
$paymentMethod->setChecks(
362+
[
363+
\Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_CHECKOUT,
364+
\Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_FOR_COUNTRY,
365+
\Magento\Payment\Model\Method\AbstractMethod::CHECK_USE_FOR_CURRENCY,
366+
\Magento\Payment\Model\Method\AbstractMethod::CHECK_ORDER_TOTAL_MIN_MAX,
367+
\Magento\Payment\Model\Method\AbstractMethod::CHECK_ZERO_TOTAL
368+
]
369+
);
368370
$quote->getPayment()->setQuote($quote);
369371

370372
$data = $paymentMethod->getData();

app/code/Magento/Quote/Test/Unit/Model/QuoteManagementTest.php

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -197,21 +197,24 @@ protected function setUp()
197197
['getStore', 'getStoreId']
198198
);
199199

200-
$this->quoteMock = $this->createPartialMock(\Magento\Quote\Model\Quote::class, [
201-
'assignCustomer',
202-
'collectTotals',
203-
'getBillingAddress',
204-
'getCheckoutMethod',
205-
'getPayment',
206-
'setCheckoutMethod',
207-
'setCustomerEmail',
208-
'setCustomerGroupId',
209-
'setCustomerId',
210-
'setCustomerIsGuest',
211-
'setRemoteIp',
212-
'setXForwardedFor',
213-
'getId',
214-
]);
200+
$this->quoteMock = $this->createPartialMock(
201+
\Magento\Quote\Model\Quote::class,
202+
[
203+
'assignCustomer',
204+
'collectTotals',
205+
'getBillingAddress',
206+
'getCheckoutMethod',
207+
'getPayment',
208+
'setCheckoutMethod',
209+
'setCustomerEmail',
210+
'setCustomerGroupId',
211+
'setCustomerId',
212+
'setCustomerIsGuest',
213+
'setRemoteIp',
214+
'setXForwardedFor',
215+
'getId'
216+
]
217+
);
215218

216219
$this->quoteAddressFactory = $this->createPartialMock(
217220
\Magento\Quote\Model\Quote\AddressFactory::class,

0 commit comments

Comments
 (0)