diff --git a/code/tests/Services/ModifiersServiceTest.php b/code/tests/Services/ModifiersServiceTest.php index b869bff9..32ab2a43 100644 --- a/code/tests/Services/ModifiersServiceTest.php +++ b/code/tests/Services/ModifiersServiceTest.php @@ -7,6 +7,7 @@ use Illuminate\Support\Collection; use App\Exceptions\AuthException; +use App\Printers\Order as OrderPrinter; class ModifiersServiceTest extends TestCase { @@ -843,7 +844,9 @@ public function testWithFriend() $order = $this->services['orders']->show($this->order->id); $booking_found = false; $shipping_cost_found = false; - $formatted = $order->formatShipping(splitFields(['lastname', 'firstname', 'name', 'quantity', 'price']), 'booked', 'all_by_name', 1); + + $printer = new OrderPrinter(); + $formatted = $printer->formatShipping($order, splitFields(['lastname', 'firstname', 'name', 'quantity', 'price']), 'booked', 'all_by_name', 1); foreach($formatted->contents as $d) { if ($d->user_id == $booking->user_id) { @@ -901,7 +904,9 @@ public function testWithOnlyFriend() $order = $this->services['orders']->show($this->order->id); $booking_found = false; $shipping_cost_found = false; - $formatted = $order->formatShipping(splitFields(['lastname', 'firstname', 'name', 'quantity', 'price']), 'booked', 'all_by_name', 1); + + $printer = new OrderPrinter(); + $formatted = $printer->formatShipping($order, splitFields(['lastname', 'firstname', 'name', 'quantity', 'price']), 'booked', 'all_by_name', 1); foreach($formatted->contents as $d) { if ($d->user_id == $newUser->id) {