Skip to content

Commit 35ec386

Browse files
committed
Array style fix #10790
1 parent 71db984 commit 35ec386

File tree

1 file changed

+44
-46
lines changed
  • dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote

1 file changed

+44
-46
lines changed

dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php

Lines changed: 44 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function testCollect()
111111
/**
112112
* Test taxes collection with full discount for quote.
113113
*
114-
* Test tax calculation with certain configuration and price calculation of items when the discount may be bigger than total
114+
* Test tax calculation and price when the discount may be bigger than total
115115
* This method will test the collector through $quote->collectTotals() method
116116
*
117117
* @see \Magento\SalesRule\Model\Utility::deltaRoundingFix
@@ -120,51 +120,51 @@ public function testCollect()
120120
*/
121121
public function testFullDiscountWithDeltaRoundingFix()
122122
{
123-
$configData = array (
123+
$configData = [
124124
'config_overrides' =>
125-
array (
125+
[
126126
'tax/calculation/apply_after_discount' => 0,
127127
'tax/calculation/discount_tax' => 1,
128128
'tax/calculation/algorithm' => 'ROW_BASE_CALCULATION',
129129
'tax/classes/shipping_tax_class' => SetupUtil::SHIPPING_TAX_CLASS,
130-
),
130+
],
131131
'tax_rate_overrides' =>
132-
array (
132+
[
133133
SetupUtil::TAX_RATE_TX => 18,
134134
SetupUtil::TAX_RATE_SHIPPING => 0,
135-
),
135+
],
136136
'tax_rule_overrides' =>
137-
array (
138-
array (
137+
[
138+
[
139139
'code' => 'Product Tax Rule',
140140
'product_tax_class_ids' =>
141-
array (
141+
[
142142
SetupUtil::PRODUCT_TAX_CLASS_1
143-
),
144-
),
145-
array (
143+
],
144+
],
145+
[
146146
'code' => 'Shipping Tax Rule',
147147
'product_tax_class_ids' =>
148-
array (
148+
[
149149
SetupUtil::SHIPPING_TAX_CLASS
150-
),
150+
],
151151
'tax_rate_ids' =>
152-
array (
152+
[
153153
SetupUtil::TAX_RATE_SHIPPING,
154-
),
155-
),
156-
),
157-
);
154+
],
155+
],
156+
],
157+
];
158158

159-
$quoteData = array (
159+
$quoteData = [
160160
'billing_address' =>
161-
array (
161+
[
162162
'region_id' => SetupUtil::REGION_TX,
163-
),
163+
],
164164
'shipping_address' =>
165-
array (
165+
[
166166
'region_id' => SetupUtil::REGION_TX,
167-
),
167+
],
168168
'items' =>
169169
[
170170
[
@@ -175,16 +175,14 @@ public function testFullDiscountWithDeltaRoundingFix()
175175
],
176176
'shipping_method' => 'free',
177177
'shopping_cart_rules' =>
178-
array (
179-
array (
180-
'discount_amount' => 100,
181-
),
182-
),
183-
);
178+
[
179+
['discount_amount' => 100],
180+
],
181+
];
184182

185-
$expectedResults = array (
183+
$expectedResults = [
186184
'address_data' =>
187-
array (
185+
[
188186
'subtotal' => 5084.74,
189187
'base_subtotal' => 5084.74,
190188
'subtotal_incl_tax' => 5999.99,
@@ -206,27 +204,27 @@ public function testFullDiscountWithDeltaRoundingFix()
206204
'grand_total' => 0,
207205
'base_grand_total' => 0,
208206
'applied_taxes' =>
209-
array (
207+
[
210208
SetupUtil::TAX_RATE_TX =>
211-
array (
209+
[
212210
'percent' => 18,
213211
'amount' => 915.25,
214212
'base_amount' => 915.25,
215213
'rates' =>
216-
array (
217-
array (
214+
[
215+
[
218216
'code' => SetupUtil::TAX_RATE_TX,
219217
'title' => SetupUtil::TAX_RATE_TX,
220218
'percent' => 18,
221-
),
222-
),
223-
)
224-
),
225-
),
219+
],
220+
],
221+
]
222+
],
223+
],
226224
'items_data' =>
227-
array (
225+
[
228226
'simple1' =>
229-
array (
227+
[
230228
'row_total' => 5084.74,
231229
'base_row_total' => 5084.74,
232230
'tax_percent' => 18,
@@ -243,9 +241,9 @@ public function testFullDiscountWithDeltaRoundingFix()
243241
'discount_percent' => 100,
244242
'discount_tax_compensation_amount' => 0,
245243
'base_discount_tax_compensation_amount' => 0,
246-
),
247-
),
248-
);
244+
],
245+
],
246+
];
249247

250248
/** @var \Magento\Framework\ObjectManagerInterface $objectManager */
251249
$objectManager = Bootstrap::getObjectManager();

0 commit comments

Comments
 (0)