Skip to content

Commit bc9128b

Browse files
author
Yu Tang
committed
MAGETWO-46808: [GITHUB] Admin order creation fails when "Include Tax In Order Total" set to yes #2675
- Fix unit test failure
1 parent 67a1071 commit bc9128b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

app/code/Magento/Tax/Model/Quote/GrandTotalDetailsPlugin.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ protected function getRatesData($rates)
7575
* @param \Magento\Quote\Model\Quote\Address\Total[] $addressTotals
7676
* @return \Magento\Quote\Api\Data\TotalSegmentInterface[]
7777
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
78+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
7879
*/
7980
public function aroundProcess(
8081
\Magento\Quote\Model\Cart\TotalsConverter $subject,

app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,12 @@ public function testAroundProcess()
179179

180180
$extensionAttributeMock = $this->getMockBuilder(
181181
'\Magento\Quote\Api\Data\TotalSegmentExtensionInterface'
182-
)->getMock();
182+
)->setMethods(
183+
[
184+
'setTaxGrandtotalDetails',
185+
186+
]
187+
)->getMockForAbstractClass();
183188
$extensionAttributeMock->expects($this->once())
184189
->method('setTaxGrandtotalDetails')
185190
->with([$taxDetailsMock])

0 commit comments

Comments
 (0)