Skip to content

Commit 23951b3

Browse files
author
Serhiy Shkolyarenko
committed
MAGETWO-55037: [GitHub]Incorrect region data for guest checkout
added unit test
1 parent 94e7315 commit 23951b3

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,35 @@ public function getConfigDataProvider()
302302
Config::CONFIG_XML_PATH_DEFAULT_POSTCODE => '*',
303303
],
304304
],
305+
'zeroRegionToNull' => [
306+
'expectedResult' => [
307+
'isDisplayShippingPriceExclTax' => 1,
308+
'isDisplayShippingBothPrices' => 1,
309+
'reviewShippingDisplayMode' => 'excluding',
310+
'reviewItemPriceDisplayMode' => 'including',
311+
'reviewTotalsDisplayMode' => 'both',
312+
'includeTaxInGrandTotal' => 1,
313+
'isFullTaxSummaryDisplayed' => 1,
314+
'isZeroTaxDisplayed' => 1,
315+
'reloadOnBillingAddress' => false,
316+
'defaultCountryId' => 'US',
317+
'defaultRegionId' => null,
318+
'defaultPostcode' => '*',
319+
],
320+
'cartShippingBoth' => 0,
321+
'cartShippingExclTax' => 1,
322+
'cartBothPrices' => 0,
323+
'cartPriceExclTax' => 0,
324+
'cartSubTotalBoth' => 1,
325+
'cartSubTotalExclTax' => 0,
326+
'isQuoteVirtual' => false,
327+
'config' => [
328+
Config::CONFIG_XML_PATH_BASED_ON => 'shipping',
329+
Config::CONFIG_XML_PATH_DEFAULT_COUNTRY => 'US',
330+
Config::CONFIG_XML_PATH_DEFAULT_REGION => 0,
331+
Config::CONFIG_XML_PATH_DEFAULT_POSTCODE => '*',
332+
],
333+
],
305334
];
306335
}
307336
}

0 commit comments

Comments
 (0)