Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove comma in single array #11734

Merged
merged 1 commit into from Dec 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -95,7 +95,7 @@ public function shippingFeesProviderCarrier1()
'carrierId' => 1,
],
'one product in cart, quantity 1' => [
'products' => [1 => 1,],
'products' => [1 => 1],
'expectedTotal' => static::PRODUCT_FIXTURES[1]['price']
+ static::CARRIER_FIXTURES[1]['ranges'][1]['shippingPrices'][static::COUNTRY_FIXTURES[static::ADDRESS_FIXTURES[1]['countryIsoCode']]['zoneId']]
+ $shippingHandling + static::DEFAULT_WRAPPING_FEE,
Expand All @@ -107,7 +107,7 @@ public function shippingFeesProviderCarrier1()
'carrierId' => 1,
],
'one product in cart, quantity 3' => [
'products' => [1 => 3,],
'products' => [1 => 3],
'expectedTotal' => 3 * static::PRODUCT_FIXTURES[1]['price']
+ static::CARRIER_FIXTURES[1]['ranges'][1]['shippingPrices'][static::COUNTRY_FIXTURES[static::ADDRESS_FIXTURES[1]['countryIsoCode']]['zoneId']]
+ $shippingHandling + static::DEFAULT_WRAPPING_FEE,
Expand Down Expand Up @@ -154,7 +154,7 @@ public function shippingFeesProviderCarrier2()
'carrierId' => 2,
],
'one product in cart, quantity 1' => [
'products' => [1 => 1,],
'products' => [1 => 1],
'expectedTotal' => static::PRODUCT_FIXTURES[1]['price']
+ static::CARRIER_FIXTURES[2]['ranges'][1]['shippingPrices'][static::COUNTRY_FIXTURES[static::ADDRESS_FIXTURES[1]['countryIsoCode']]['zoneId']]
+ $shippingHandling + static::DEFAULT_WRAPPING_FEE,
Expand All @@ -166,7 +166,7 @@ public function shippingFeesProviderCarrier2()
'carrierId' => 2,
],
'one product in cart, quantity 3' => [
'products' => [1 => 3,],
'products' => [1 => 3],
'expectedTotal' => 3 * static::PRODUCT_FIXTURES[1]['price']
+ static::CARRIER_FIXTURES[2]['ranges'][1]['shippingPrices'][static::COUNTRY_FIXTURES[static::ADDRESS_FIXTURES[1]['countryIsoCode']]['zoneId']]
+ $shippingHandling + static::DEFAULT_WRAPPING_FEE,
Expand Down
Expand Up @@ -80,7 +80,7 @@ public function cartWithOneProductSpecificCartRulesAmountProvider()
'carrierId' => 1,
],
' carrier #1: one product in cart, quantity 1' => [
'products' => [1 => 1,],
'products' => [1 => 1],
'expectedTotal' => static::PRODUCT_FIXTURES[1]['price']
+ static::CARRIER_FIXTURES[1]['ranges'][1]['shippingPrices'][static::COUNTRY_FIXTURES[static::ADDRESS_FIXTURES[1]['countryIsoCode']]['zoneId']]
+ $shippingHandling + static::DEFAULT_WRAPPING_FEE,
Expand All @@ -102,7 +102,7 @@ public function cartWithOneProductSpecificCartRulesAmountProvider()
],
// following is testing the bug http://forge.prestashop.com/browse/BOOM-3307
' carrier #2 (voucher specific): one product in cart, quantity 1' => [
'products' => [1 => 1,],
'products' => [1 => 1],
'expectedTotal' => (1 - static::CART_RULES_FIXTURES[1]['percent'] / 100)
* static::PRODUCT_FIXTURES[1]['price']
+ static::CARRIER_FIXTURES[2]['ranges'][1]['shippingPrices'][static::COUNTRY_FIXTURES[static::ADDRESS_FIXTURES[1]['countryIsoCode']]['zoneId']]
Expand Down
Expand Up @@ -228,13 +228,13 @@ public function getCurrencyData($defaultCurrencyId, $currencyId)
'cartRules' => [],
],
'one product in cart, quantity 1' => [
'products' => [1 => 1,],
'products' => [1 => 1],
'expectedTotal' => $rate * (static::PRODUCT_FIXTURES[1]['price']
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE),
'cartRules' => [],
],
'one product in cart, quantity 3' => [
'products' => [1 => 3,],
'products' => [1 => 3],
'expectedTotal' => round(
$rate * (3 * static::PRODUCT_FIXTURES[1]['price']
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE),
Expand Down
Expand Up @@ -102,14 +102,14 @@ public function roundingModeDataProvider()
'roundingMode' => PS_ROUND_UP,
],
'PS_ROUND_UP one product in cart, quantity 1' => [
'products' => [1 => 1,],
'products' => [1 => 1],
'expectedTotal' => Tools::ps_round(static::PRODUCT_FIXTURES[1]['price'], 2, PS_ROUND_UP)
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => [],
'roundingMode' => PS_ROUND_UP,
],
'PS_ROUND_UP one product in cart, quantity 3' => [
'products' => [1 => 3,],
'products' => [1 => 3],
'expectedTotal' => Tools::ps_round(3 * static::PRODUCT_FIXTURES[1]['price'], 2, PS_ROUND_UP)
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => [],
Expand All @@ -136,14 +136,14 @@ public function roundingModeDataProvider()
'roundingMode' => PS_ROUND_DOWN,
],
'PS_ROUND_DOWN one product in cart, quantity 1' => [
'products' => [1 => 1,],
'products' => [1 => 1],
'expectedTotal' => Tools::ps_round(static::PRODUCT_FIXTURES[1]['price'], 2, PS_ROUND_DOWN)
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => [],
'roundingMode' => PS_ROUND_DOWN,
],
'PS_ROUND_DOWN one product in cart, quantity 3' => [
'products' => [1 => 3,],
'products' => [1 => 3],
'expectedTotal' => Tools::ps_round(3 * static::PRODUCT_FIXTURES[1]['price'], 2, PS_ROUND_DOWN)
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => [],
Expand All @@ -170,14 +170,14 @@ public function roundingModeDataProvider()
'roundingMode' => PS_ROUND_HALF_UP,
],
'PS_ROUND_HALF_UP one product in cart, quantity 1' => [
'products' => [1 => 1,],
'products' => [1 => 1],
'expectedTotal' => Tools::ps_round(static::PRODUCT_FIXTURES[1]['price'], 2, PS_ROUND_HALF_UP)
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => [],
'roundingMode' => PS_ROUND_HALF_UP,
],
'PS_ROUND_HALF_UP one product in cart, quantity 3' => [
'products' => [1 => 3,],
'products' => [1 => 3],
'expectedTotal' => Tools::ps_round(3 * static::PRODUCT_FIXTURES[1]['price'], 2, PS_ROUND_HALF_UP)
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => [],
Expand All @@ -204,14 +204,14 @@ public function roundingModeDataProvider()
'roundingMode' => PS_ROUND_HALF_DOWN,
],
'PS_ROUND_HALF_DOWN one product in cart, quantity 1' => [
'products' => [1 => 1,],
'products' => [1 => 1],
'expectedTotal' => Tools::ps_round(static::PRODUCT_FIXTURES[1]['price'], 2, PS_ROUND_HALF_DOWN)
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => [],
'roundingMode' => PS_ROUND_HALF_DOWN,
],
'PS_ROUND_HALF_DOWN one product in cart, quantity 3' => [
'products' => [1 => 3,],
'products' => [1 => 3],
'expectedTotal' => Tools::ps_round(3 * static::PRODUCT_FIXTURES[1]['price'], 2, PS_ROUND_HALF_DOWN)
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => [],
Expand All @@ -238,14 +238,14 @@ public function roundingModeDataProvider()
'roundingMode' => PS_ROUND_HALF_ODD,
],
'PS_ROUND_HALF_ODD one product in cart, quantity 1' => [
'products' => [1 => 1,],
'products' => [1 => 1],
'expectedTotal' => Tools::ps_round(static::PRODUCT_FIXTURES[1]['price'], 2, PS_ROUND_HALF_ODD)
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => [],
'roundingMode' => PS_ROUND_HALF_ODD,
],
'PS_ROUND_HALF_ODD one product in cart, quantity 3' => [
'products' => [1 => 3,],
'products' => [1 => 3],
'expectedTotal' => Tools::ps_round(3 * static::PRODUCT_FIXTURES[1]['price'], 2, PS_ROUND_HALF_ODD)
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => [],
Expand All @@ -272,14 +272,14 @@ public function roundingModeDataProvider()
'roundingMode' => PS_ROUND_HALF_EVEN,
],
'PS_ROUND_HALF_EVEN one product in cart, quantity 1' => [
'products' => [1 => 1,],
'products' => [1 => 1],
'expectedTotal' => Tools::ps_round(static::PRODUCT_FIXTURES[1]['price'], 2, PS_ROUND_HALF_EVEN)
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => [],
'roundingMode' => PS_ROUND_HALF_EVEN,
],
'PS_ROUND_HALF_EVEN one product in cart, quantity 3' => [
'products' => [1 => 3,],
'products' => [1 => 3],
'expectedTotal' => Tools::ps_round(3 * static::PRODUCT_FIXTURES[1]['price'], 2, PS_ROUND_HALF_EVEN)
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => [],
Expand Down
Expand Up @@ -99,14 +99,14 @@ public function roundingTypeDataProvider()
'roundingType' => Order::ROUND_ITEM,
],
'ROUND_ITEM one product in cart, quantity 1' => [
'products' => [1 => 1,],
'products' => [1 => 1],
'expectedTotal' => Tools::ps_round(static::PRODUCT_FIXTURES[1]['price'], 2)
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => [],
'roundingMode' => Order::ROUND_ITEM,
],
'ROUND_ITEM one product in cart, quantity 3' => [
'products' => [1 => 3,],
'products' => [1 => 3],
'expectedTotal' => Tools::ps_round(3 * Tools::ps_round(static::PRODUCT_FIXTURES[1]['price'], 2), 2)
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => [],
Expand Down Expand Up @@ -137,14 +137,14 @@ public function roundingTypeDataProvider()
'roundingType' => Order::ROUND_LINE,
],
'ROUND_LINE one product in cart, quantity 1' => [
'products' => [1 => 1,],
'products' => [1 => 1],
'expectedTotal' => Tools::ps_round(static::PRODUCT_FIXTURES[1]['price'], 2)
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => [],
'roundingMode' => Order::ROUND_LINE,
],
'ROUND_LINE one product in cart, quantity 3' => [
'products' => [1 => 3,],
'products' => [1 => 3],
'expectedTotal' => Tools::ps_round(3 * static::PRODUCT_FIXTURES[1]['price'], 2)
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => [],
Expand Down Expand Up @@ -174,14 +174,14 @@ public function roundingTypeDataProvider()
'roundingType' => Order::ROUND_TOTAL,
],
'ROUND_TOTAL one product in cart, quantity 1' => [
'products' => [1 => 1,],
'products' => [1 => 1],
'expectedTotal' => Tools::ps_round(static::PRODUCT_FIXTURES[1]['price'], 2)
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => [],
'roundingMode' => Order::ROUND_TOTAL,
],
'ROUND_TOTAL one product in cart, quantity 3' => [
'products' => [1 => 3,],
'products' => [1 => 3],
'expectedTotal' => Tools::ps_round(3 * static::PRODUCT_FIXTURES[1]['price'], 2)
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => [],
Expand Down
Expand Up @@ -73,7 +73,7 @@ public function cartWithoutCartRulesProvider()
'cartRules' => [],
],
'one product in cart, quantity 1' => [
'products' => [1 => 1,],
'products' => [1 => 1],
'expectedTotal' => static::PRODUCT_FIXTURES[1]['price']
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'expectedTotalWithGiftWrapping' => static::PRODUCT_FIXTURES[1]['price']
Expand All @@ -82,7 +82,7 @@ public function cartWithoutCartRulesProvider()
+ static::GIFT_WRAPPING_PRICE,
],
'one product in cart, quantity 3' => [
'products' => [1 => 3,],
'products' => [1 => 3],
'expectedTotal' => 3 * static::PRODUCT_FIXTURES[1]['price']
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'expectedTotalWithGiftWrapping' => 3 * static::PRODUCT_FIXTURES[1]['price']
Expand Down
Expand Up @@ -51,13 +51,13 @@ public function cartWithoutCartRulesProvider()
'cartRules' => array(),
),
'one product in cart, quantity 1' => array(
'products' => array(1 => 1,),
'products' => array(1 => 1),
'expectedTotal' => static::PRODUCT_FIXTURES[1]['price']
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => array(),
),
'one product in cart, quantity 3' => array(
'products' => array(1 => 3,),
'products' => array(1 => 3),
'expectedTotal' => 3 * static::PRODUCT_FIXTURES[1]['price']
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'cartRules' => array(),
Expand Down
Expand Up @@ -110,7 +110,7 @@ public function cartTaxesProvider()
'addressId' => static::ADDRESS_ID_1,
],
'tax #1: one product in cart, quantity 1' => [
'products' => [1 => 1,],
'products' => [1 => 1],
'expectedTotalTaxExcl' => static::PRODUCT_FIXTURES[1]['price']
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'expectedTotalTaxIncl' => static::PRODUCT_FIXTURES[1]['price'] * (1 + static::TAX_RATE_1 / 100)
Expand All @@ -119,7 +119,7 @@ public function cartTaxesProvider()
'addressId' => static::ADDRESS_ID_1,
],
'tax #2: one product in cart, quantity 1' => [
'products' => [5 => 1,],
'products' => [5 => 1],
'expectedTotalTaxExcl' => static::PRODUCT_FIXTURES[5]['price']
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'expectedTotalTaxIncl' => static::PRODUCT_FIXTURES[5]['price'] * (1 + static::TAX_RATE_2 / 100)
Expand All @@ -128,7 +128,7 @@ public function cartTaxesProvider()
'addressId' => static::ADDRESS_ID_2,
],
'tax #3: one product in cart, quantity 1' => [
'products' => [5 => 1,],
'products' => [5 => 1],
'expectedTotalTaxExcl' => static::PRODUCT_FIXTURES[5]['price']
+ static::DEFAULT_WRAPPING_FEE,
'expectedTotalTaxIncl' => static::PRODUCT_FIXTURES[5]['price'] * (1 + static::TAX_RATE_3 / 100)
Expand All @@ -137,7 +137,7 @@ public function cartTaxesProvider()
'addressId' => static::ADDRESS_ID_3,
],
'tax #1: one product in cart, quantity 3' => [
'products' => [1 => 3,],
'products' => [1 => 3],
'expectedTotalTaxExcl' => 3 * static::PRODUCT_FIXTURES[1]['price']
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'expectedTotalTaxIncl' => 3 * static::PRODUCT_FIXTURES[1]['price'] * (1 + static::TAX_RATE_1 / 100)
Expand All @@ -146,7 +146,7 @@ public function cartTaxesProvider()
'addressId' => static::ADDRESS_ID_1,
],
'tax #2: one product in cart, quantity 3' => [
'products' => [5 => 3,],
'products' => [5 => 3],
'expectedTotalTaxExcl' => 3 * static::PRODUCT_FIXTURES[5]['price']
+ static::DEFAULT_SHIPPING_FEE + static::DEFAULT_WRAPPING_FEE,
'expectedTotalTaxIncl' => 3 * static::PRODUCT_FIXTURES[5]['price'] * (1 + static::TAX_RATE_2 / 100)
Expand All @@ -155,7 +155,7 @@ public function cartTaxesProvider()
'addressId' => static::ADDRESS_ID_2,
],
'tax #3: one product in cart, quantity 3' => [
'products' => [5 => 3,],
'products' => [5 => 3],
'expectedTotalTaxExcl' => 3 * static::PRODUCT_FIXTURES[5]['price']
+ static::DEFAULT_WRAPPING_FEE,
'expectedTotalTaxIncl' => 3 * static::PRODUCT_FIXTURES[5]['price'] * (1 + static::TAX_RATE_3 / 100)
Expand Down