@@ -362,11 +362,7 @@ public function testMultishipping(
362
362
$ orderSender = $ this ->getMockBuilder (OrderSender::class)
363
363
->disableOriginalConstructor ()
364
364
->getMock ();
365
-
366
- $ model = $ this ->objectManager ->create (
367
- Multishipping::class,
368
- ['orderSender ' => $ orderSender ]
369
- );
365
+ $ model = $ this ->objectManager ->create (Multishipping::class, ['orderSender ' => $ orderSender ]);
370
366
$ model ->createOrders ();
371
367
$ orderList = $ this ->getOrderList ((int )$ quote ->getId ());
372
368
$ this ->assertCount (3 , $ orderList );
@@ -377,86 +373,41 @@ public function testMultishipping(
377
373
*/
378
374
$ firstOrder = array_shift ($ orderList );
379
375
$ this ->assertNotEmpty ($ firstOrder ->getAppliedRuleIds ());
380
- $ this ->assertEquals (
381
- $ firstOrderTotals ['subtotal ' ],
382
- $ firstOrder ->getSubtotal ()
383
- );
384
- $ this ->assertEquals (
385
- $ firstOrderTotals ['discount_amount ' ],
386
- $ firstOrder ->getDiscountAmount ()
387
- );
388
- $ this ->assertEquals (
389
- $ firstOrderTotals ['shipping_amount ' ],
390
- $ firstOrder ->getShippingAmount ()
391
- );
392
- $ this ->assertEquals (
393
- $ firstOrderTotals ['grand_total ' ],
394
- $ firstOrder ->getGrandTotal ()
395
- );
376
+ $ this ->assertEquals ($ firstOrderTotals ['subtotal ' ], $ firstOrder ->getSubtotal ());
377
+ $ this ->assertEquals ($ firstOrderTotals ['discount_amount ' ], $ firstOrder ->getDiscountAmount ());
378
+ $ this ->assertEquals ($ firstOrderTotals ['shipping_amount ' ], $ firstOrder ->getShippingAmount ());
379
+ $ this ->assertEquals ($ firstOrderTotals ['grand_total ' ], $ firstOrder ->getGrandTotal ());
396
380
$ firstOrderItem = array_values ($ firstOrder ->getItems ())[0 ];
397
381
$ this ->assertNotEmpty ($ firstOrderItem ->getAppliedRuleIds ());
398
- $ this ->assertEquals (
399
- $ firstOrderTotals ['discount_amount ' ] * -1 ,
400
- $ firstOrderItem ->getDiscountAmount ()
401
- );
382
+ $ this ->assertEquals ($ firstOrderTotals ['discount_amount ' ] * -1 , $ firstOrderItem ->getDiscountAmount ());
402
383
403
384
/**
404
385
* The order with $20 simple product
405
386
* @var Order $secondOrder
406
387
*/
407
388
$ secondOrder = array_shift ($ orderList );
408
389
$ this ->assertNotEmpty ($ secondOrder ->getAppliedRuleIds ());
409
- $ this ->assertEquals (
410
- $ secondOrderTotals ['subtotal ' ],
411
- $ secondOrder ->getSubtotal ()
412
- );
413
- $ this ->assertEquals (
414
- $ secondOrderTotals ['discount_amount ' ],
415
- $ secondOrder ->getDiscountAmount ()
416
- );
417
- $ this ->assertEquals (
418
- $ secondOrderTotals ['shipping_amount ' ],
419
- $ secondOrder ->getShippingAmount ()
420
- );
421
- $ this ->assertEquals (
422
- $ secondOrderTotals ['grand_total ' ],
423
- $ secondOrder ->getGrandTotal ()
424
- );
390
+ $ this ->assertEquals ($ secondOrderTotals ['subtotal ' ], $ secondOrder ->getSubtotal ());
391
+ $ this ->assertEquals ($ secondOrderTotals ['discount_amount ' ], $ secondOrder ->getDiscountAmount ());
392
+ $ this ->assertEquals ($ secondOrderTotals ['shipping_amount ' ], $ secondOrder ->getShippingAmount ());
393
+ $ this ->assertEquals ($ secondOrderTotals ['grand_total ' ], $ secondOrder ->getGrandTotal ());
425
394
$ secondOrderItem = array_values ($ secondOrder ->getItems ())[0 ];
426
395
$ this ->assertNotEmpty ($ secondOrderItem ->getAppliedRuleIds ());
427
- $ this ->assertEquals (
428
- $ secondOrderTotals ['discount_amount ' ] * -1 ,
429
- $ secondOrderItem ->getDiscountAmount ()
430
- );
396
+ $ this ->assertEquals ($ secondOrderTotals ['discount_amount ' ] * -1 , $ secondOrderItem ->getDiscountAmount ());
431
397
432
398
/**
433
399
* The order with $5 virtual product and billing address as shipping
434
400
* @var Order $thirdOrder
435
401
*/
436
402
$ thirdOrder = array_shift ($ orderList );
437
403
$ this ->assertNotEmpty ($ thirdOrder ->getAppliedRuleIds ());
438
- $ this ->assertEquals (
439
- $ thirdOrderTotals ['subtotal ' ],
440
- $ thirdOrder ->getSubtotal ()
441
- );
442
- $ this ->assertEquals (
443
- $ thirdOrderTotals ['discount_amount ' ],
444
- $ thirdOrder ->getDiscountAmount ()
445
- );
446
- $ this ->assertEquals (
447
- $ thirdOrderTotals ['shipping_amount ' ],
448
- $ thirdOrder ->getShippingAmount ()
449
- );
450
- $ this ->assertEquals (
451
- $ thirdOrderTotals ['grand_total ' ],
452
- $ thirdOrder ->getGrandTotal ()
453
- );
404
+ $ this ->assertEquals ($ thirdOrderTotals ['subtotal ' ], $ thirdOrder ->getSubtotal ());
405
+ $ this ->assertEquals ($ thirdOrderTotals ['discount_amount ' ], $ thirdOrder ->getDiscountAmount ());
406
+ $ this ->assertEquals ($ thirdOrderTotals ['shipping_amount ' ], $ thirdOrder ->getShippingAmount ());
407
+ $ this ->assertEquals ($ thirdOrderTotals ['grand_total ' ], $ thirdOrder ->getGrandTotal ());
454
408
$ thirdOrderItem = array_values ($ thirdOrder ->getItems ())[0 ];
455
409
$ this ->assertNotEmpty ($ thirdOrderItem ->getAppliedRuleIds ());
456
- $ this ->assertEquals (
457
- $ thirdOrderTotals ['discount_amount ' ] * -1 ,
458
- $ thirdOrderItem ->getDiscountAmount ()
459
- );
410
+ $ this ->assertEquals ($ thirdOrderTotals ['discount_amount ' ] * -1 , $ thirdOrderItem ->getDiscountAmount ());
460
411
}
461
412
462
413
/**
0 commit comments