Skip to content

Commit cc4e0b1

Browse files
committed
ACP2E-2303: Shipping prices do not include tax in the Shipping Method
- Added the test coverage.
1 parent 3b2af91 commit cc4e0b1

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

app/code/Magento/Tax/Test/Unit/Model/ConfigTest.php

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,39 @@ public function testNeedPriceConversion(): void
392392
$scopeConfigMock = $this->getMockForAbstractClass(ScopeConfigInterface::class);
393393
$scopeConfigMock
394394
->method('getValue')
395-
->willReturn(true);
395+
->willReturnMap(
396+
[
397+
[
398+
Config::XML_PATH_DISPLAY_CART_SHIPPING,
399+
ScopeInterface::SCOPE_STORE,
400+
null,
401+
true
402+
],
403+
[
404+
Config::XML_PATH_DISPLAY_CART_SHIPPING,
405+
ScopeInterface::SCOPE_STORE,
406+
null,
407+
false
408+
],
409+
[
410+
Config::CONFIG_XML_PATH_PRICE_DISPLAY_TYPE,
411+
ScopeInterface::SCOPE_STORE,
412+
null,
413+
true
414+
],
415+
[
416+
Config::XML_PATH_DISPLAY_CART_PRICE,
417+
ScopeInterface::SCOPE_STORE,
418+
null,
419+
false
420+
]
421+
]
422+
);
396423
/** @var Config */
397424
$model = new Config($scopeConfigMock);
425+
$model->setPriceIncludesTax(false);
426+
$model->setNeedUseShippingExcludeTax(false);
427+
$model->setShippingPriceIncludeTax(false);
398428
$this->assertEquals(true, $model->needPriceConversion());
399429
}
400430
}

0 commit comments

Comments
 (0)