@@ -111,7 +111,7 @@ public function testCollect()
111
111
/**
112
112
* Test taxes collection with full discount for quote.
113
113
*
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
115
115
* This method will test the collector through $quote->collectTotals() method
116
116
*
117
117
* @see \Magento\SalesRule\Model\Utility::deltaRoundingFix
@@ -120,51 +120,51 @@ public function testCollect()
120
120
*/
121
121
public function testFullDiscountWithDeltaRoundingFix ()
122
122
{
123
- $ configData = array (
123
+ $ configData = [
124
124
'config_overrides ' =>
125
- array (
125
+ [
126
126
'tax/calculation/apply_after_discount ' => 0 ,
127
127
'tax/calculation/discount_tax ' => 1 ,
128
128
'tax/calculation/algorithm ' => 'ROW_BASE_CALCULATION ' ,
129
129
'tax/classes/shipping_tax_class ' => SetupUtil::SHIPPING_TAX_CLASS ,
130
- ) ,
130
+ ] ,
131
131
'tax_rate_overrides ' =>
132
- array (
132
+ [
133
133
SetupUtil::TAX_RATE_TX => 18 ,
134
134
SetupUtil::TAX_RATE_SHIPPING => 0 ,
135
- ) ,
135
+ ] ,
136
136
'tax_rule_overrides ' =>
137
- array (
138
- array (
137
+ [
138
+ [
139
139
'code ' => 'Product Tax Rule ' ,
140
140
'product_tax_class_ids ' =>
141
- array (
141
+ [
142
142
SetupUtil::PRODUCT_TAX_CLASS_1
143
- ) ,
144
- ) ,
145
- array (
143
+ ] ,
144
+ ] ,
145
+ [
146
146
'code ' => 'Shipping Tax Rule ' ,
147
147
'product_tax_class_ids ' =>
148
- array (
148
+ [
149
149
SetupUtil::SHIPPING_TAX_CLASS
150
- ) ,
150
+ ] ,
151
151
'tax_rate_ids ' =>
152
- array (
152
+ [
153
153
SetupUtil::TAX_RATE_SHIPPING ,
154
- ) ,
155
- ) ,
156
- ) ,
157
- ) ;
154
+ ] ,
155
+ ] ,
156
+ ] ,
157
+ ] ;
158
158
159
- $ quoteData = array (
159
+ $ quoteData = [
160
160
'billing_address ' =>
161
- array (
161
+ [
162
162
'region_id ' => SetupUtil::REGION_TX ,
163
- ) ,
163
+ ] ,
164
164
'shipping_address ' =>
165
- array (
165
+ [
166
166
'region_id ' => SetupUtil::REGION_TX ,
167
- ) ,
167
+ ] ,
168
168
'items ' =>
169
169
[
170
170
[
@@ -175,16 +175,14 @@ public function testFullDiscountWithDeltaRoundingFix()
175
175
],
176
176
'shipping_method ' => 'free ' ,
177
177
'shopping_cart_rules ' =>
178
- array (
179
- array (
180
- 'discount_amount ' => 100 ,
181
- ),
182
- ),
183
- );
178
+ [
179
+ ['discount_amount ' => 100 ],
180
+ ],
181
+ ];
184
182
185
- $ expectedResults = array (
183
+ $ expectedResults = [
186
184
'address_data ' =>
187
- array (
185
+ [
188
186
'subtotal ' => 5084.74 ,
189
187
'base_subtotal ' => 5084.74 ,
190
188
'subtotal_incl_tax ' => 5999.99 ,
@@ -206,27 +204,27 @@ public function testFullDiscountWithDeltaRoundingFix()
206
204
'grand_total ' => 0 ,
207
205
'base_grand_total ' => 0 ,
208
206
'applied_taxes ' =>
209
- array (
207
+ [
210
208
SetupUtil::TAX_RATE_TX =>
211
- array (
209
+ [
212
210
'percent ' => 18 ,
213
211
'amount ' => 915.25 ,
214
212
'base_amount ' => 915.25 ,
215
213
'rates ' =>
216
- array (
217
- array (
214
+ [
215
+ [
218
216
'code ' => SetupUtil::TAX_RATE_TX ,
219
217
'title ' => SetupUtil::TAX_RATE_TX ,
220
218
'percent ' => 18 ,
221
- ) ,
222
- ) ,
223
- )
224
- ) ,
225
- ) ,
219
+ ] ,
220
+ ] ,
221
+ ]
222
+ ] ,
223
+ ] ,
226
224
'items_data ' =>
227
- array (
225
+ [
228
226
'simple1 ' =>
229
- array (
227
+ [
230
228
'row_total ' => 5084.74 ,
231
229
'base_row_total ' => 5084.74 ,
232
230
'tax_percent ' => 18 ,
@@ -243,9 +241,9 @@ public function testFullDiscountWithDeltaRoundingFix()
243
241
'discount_percent ' => 100 ,
244
242
'discount_tax_compensation_amount ' => 0 ,
245
243
'base_discount_tax_compensation_amount ' => 0 ,
246
- ) ,
247
- ) ,
248
- ) ;
244
+ ] ,
245
+ ] ,
246
+ ] ;
249
247
250
248
/** @var \Magento\Framework\ObjectManagerInterface $objectManager */
251
249
$ objectManager = Bootstrap::getObjectManager ();
0 commit comments