Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 5b58a34

Browse files
committed
Fixed an empty line at the end of the class and reduced the number of
lines in the test provider method
1 parent 7a0534a commit 5b58a34

File tree

1 file changed

+31
-105
lines changed

1 file changed

+31
-105
lines changed

app/code/Magento/Sales/Test/Unit/Model/Order/ItemTest.php

Lines changed: 31 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -275,161 +275,87 @@ public function getItemQtyVariants()
275275
return [
276276
'empty_item' => [
277277
'options' => [
278-
'qty_ordered' => 0,
279-
'qty_invoiced' => 0,
280-
'qty_refunded' => 0,
281-
'qty_shipped' => 0,
282-
'qty_canceled' => 0,
278+
'qty_ordered' => 0, 'qty_invoiced' => 0, 'qty_refunded' => 0, 'qty_shipped' => 0,
279+
'qty_canceled' => 0
283280
],
284-
'expectedResult' => [
285-
'to_ship' => 0.0,
286-
'to_invoice' => 0.0
287-
]
281+
'expectedResult' => ['to_ship' => 0.0, 'to_invoice' => 0.0]
288282
],
289283
'ordered_item' => [
290284
'options' => [
291-
'qty_ordered' => 12,
292-
'qty_invoiced' => 0,
293-
'qty_refunded' => 0,
294-
'qty_shipped' => 0,
295-
'qty_canceled' => 0,
285+
'qty_ordered' => 12, 'qty_invoiced' => 0, 'qty_refunded' => 0, 'qty_shipped' => 0,
286+
'qty_canceled' => 0
296287
],
297-
'expectedResult' => [
298-
'to_ship' => 12.0,
299-
'to_invoice' => 12.0
300-
]
288+
'expectedResult' => ['to_ship' => 12.0, 'to_invoice' => 12.0]
301289
],
302290
'partially_invoiced' => [
303-
'options' => [
304-
'qty_ordered' => 12,
305-
'qty_invoiced' => 4,
306-
'qty_refunded' => 0,
307-
'qty_shipped' => 0,
291+
'options' => ['qty_ordered' => 12, 'qty_invoiced' => 4, 'qty_refunded' => 0, 'qty_shipped' => 0,
308292
'qty_canceled' => 0,
309293
],
310-
'expectedResult' => [
311-
'to_ship' => 12.0,
312-
'to_invoice' => 8.0
313-
]
294+
'expectedResult' => ['to_ship' => 12.0, 'to_invoice' => 8.0]
314295
],
315296
'completely_invoiced' => [
316297
'options' => [
317-
'qty_ordered' => 12,
318-
'qty_invoiced' => 12,
319-
'qty_refunded' => 0,
320-
'qty_shipped' => 0,
298+
'qty_ordered' => 12, 'qty_invoiced' => 12, 'qty_refunded' => 0, 'qty_shipped' => 0,
321299
'qty_canceled' => 0,
322300
],
323-
'expectedResult' => [
324-
'to_ship' => 12.0,
325-
'to_invoice' => 0.0
326-
]
301+
'expectedResult' => ['to_ship' => 12.0, 'to_invoice' => 0.0]
327302
],
328303
'partially_invoiced_refunded' => [
329304
'options' => [
330-
'qty_ordered' => 12,
331-
'qty_invoiced' => 5,
332-
'qty_refunded' => 5,
333-
'qty_shipped' => 0,
305+
'qty_ordered' => 12, 'qty_invoiced' => 5, 'qty_refunded' => 5, 'qty_shipped' => 0,
334306
'qty_canceled' => 0,
335307
],
336-
'expectedResult' => [
337-
'to_ship' => 7.0,
338-
'to_invoice' => 7.0
339-
]
308+
'expectedResult' => ['to_ship' => 7.0, 'to_invoice' => 7.0]
340309
],
341310
'partially_refunded' => [
342311
'options' => [
343-
'qty_ordered' => 12,
344-
'qty_invoiced' => 12,
345-
'qty_refunded' => 5,
346-
'qty_shipped' => 0,
312+
'qty_ordered' => 12, 'qty_invoiced' => 12, 'qty_refunded' => 5, 'qty_shipped' => 0,
347313
'qty_canceled' => 0,
348314
],
349-
'expectedResult' => [
350-
'to_ship' => 7.0,
351-
'to_invoice' => 0.0
352-
]
315+
'expectedResult' => ['to_ship' => 7.0, 'to_invoice' => 0.0]
353316
],
354317
'partially_shipped' => [
355318
'options' => [
356-
'qty_ordered' => 12,
357-
'qty_invoiced' => 0,
358-
'qty_refunded' => 0,
359-
'qty_shipped' => 4,
360-
'qty_canceled' => 0,
319+
'qty_ordered' => 12, 'qty_invoiced' => 0, 'qty_refunded' => 0, 'qty_shipped' => 4,
320+
'qty_canceled' => 0
361321
],
362-
'expectedResult' => [
363-
'to_ship' => 8.0,
364-
'to_invoice' => 12.0
365-
]
322+
'expectedResult' => ['to_ship' => 8.0, 'to_invoice' => 12.0]
366323
],
367324
'partially_refunded_partially_shipped' => [
368325
'options' => [
369-
'qty_ordered' => 12,
370-
'qty_invoiced' => 12,
371-
'qty_refunded' => 5,
372-
'qty_shipped' => 4,
373-
'qty_canceled' => 0,
326+
'qty_ordered' => 12, 'qty_invoiced' => 12, 'qty_refunded' => 5, 'qty_shipped' => 4,
327+
'qty_canceled' => 0
374328
],
375-
'expectedResult' => [
376-
'to_ship' => 3.0,
377-
'to_invoice' => 0.0
378-
]
329+
'expectedResult' => ['to_ship' => 3.0, 'to_invoice' => 0.0]
379330
],
380331
'complete' => [
381332
'options' => [
382-
'qty_ordered' => 12,
383-
'qty_invoiced' => 12,
384-
'qty_refunded' => 0,
385-
'qty_shipped' => 12,
386-
'qty_canceled' => 0,
333+
'qty_ordered' => 12, 'qty_invoiced' => 12, 'qty_refunded' => 0, 'qty_shipped' => 12,
334+
'qty_canceled' => 0
387335
],
388-
'expectedResult' => [
389-
'to_ship' => 0.0,
390-
'to_invoice' => 0.0
391-
]
336+
'expectedResult' => ['to_ship' => 0.0, 'to_invoice' => 0.0]
392337
],
393338
'canceled' => [
394339
'options' => [
395-
'qty_ordered' => 12,
396-
'qty_invoiced' => 0,
397-
'qty_refunded' => 0,
398-
'qty_shipped' => 0,
399-
'qty_canceled' => 12,
340+
'qty_ordered' => 12, 'qty_invoiced' => 0, 'qty_refunded' => 0, 'qty_shipped' => 0,
341+
'qty_canceled' => 12
400342
],
401-
'expectedResult' => [
402-
'to_ship' => 0.0,
403-
'to_invoice' => 0.0
404-
]
343+
'expectedResult' => ['to_ship' => 0.0, 'to_invoice' => 0.0]
405344
],
406345
'completely_shipped_using_decimals' => [
407346
'options' => [
408-
'qty_ordered' => 4.4,
409-
'qty_invoiced' => 0.4,
410-
'qty_refunded' => 0.4,
411-
'qty_shipped' => 4,
347+
'qty_ordered' => 4.4, 'qty_invoiced' => 0.4, 'qty_refunded' => 0.4, 'qty_shipped' => 4,
412348
'qty_canceled' => 0,
413349
],
414-
'expectedResult' => [
415-
'to_ship' => 0.0,
416-
'to_invoice' => 4.0
417-
]
350+
'expectedResult' => ['to_ship' => 0.0, 'to_invoice' => 4.0]
418351
],
419352
'completely_invoiced_using_decimals' => [
420353
'options' => [
421-
'qty_ordered' => 4.4,
422-
'qty_invoiced' => 4,
423-
'qty_refunded' => 0,
424-
'qty_shipped' => 4,
425-
'qty_canceled' => 0.4,
354+
'qty_ordered' => 4.4, 'qty_invoiced' => 4, 'qty_refunded' => 0, 'qty_shipped' => 4,
355+
'qty_canceled' => 0.4
426356
],
427-
'expectedResult' => [
428-
'to_ship' => 0.0,
429-
'to_invoice' => 0.0
430-
]
357+
'expectedResult' => ['to_ship' => 0.0, 'to_invoice' => 0.0]
431358
]
432359
];
433360
}
434-
435361
}

0 commit comments

Comments
 (0)