From 3e676639a9f748429acd8cdd5ed14d2b2486ab22 Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Tue, 10 Dec 2024 13:58:43 +0100 Subject: [PATCH] NTR: PISHPS-393: Add shipping costs when nothing is left to ship --- src/Resources/config/services/subscriber.xml | 4 ++++ tests/PHPUnit/Service/MollieApi/ShipmentTest.php | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/src/Resources/config/services/subscriber.xml b/src/Resources/config/services/subscriber.xml index 48604b7af..98c9b77d9 100644 --- a/src/Resources/config/services/subscriber.xml +++ b/src/Resources/config/services/subscriber.xml @@ -87,6 +87,10 @@ + + + + diff --git a/tests/PHPUnit/Service/MollieApi/ShipmentTest.php b/tests/PHPUnit/Service/MollieApi/ShipmentTest.php index 4718ecb8f..55ab5cbcd 100644 --- a/tests/PHPUnit/Service/MollieApi/ShipmentTest.php +++ b/tests/PHPUnit/Service/MollieApi/ShipmentTest.php @@ -129,11 +129,16 @@ public function testShipOrderCannotBeShippedException() */ public function testShipItem() { + $this->mollieOrder ->expects($this->once()) ->method('createShipment') ->willReturn($this->createMock(MollieShipment::class)); + $this->mollieOrder->method('lines')->willReturn($this->createMock(OrderLineCollection::class)); + + + $this->shipmentApiService->shipItem('mollieOrderId', 'salesChannelId', 'mollieOrderLineId', 1, null); } @@ -146,6 +151,7 @@ public function testShipItemCannotBeShippedException() ->expects($this->once()) ->method('createShipment') ->willThrowException(new ApiException()); + $this->mollieOrder->method('lines')->willReturn($this->createMock(OrderLineCollection::class)); $this->expectException(MollieOrderCouldNotBeShippedException::class);