Skip to content

Commit

Permalink
NTR: PISHPS-393: Add shipping costs when nothing is left to ship
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalij Mik committed Dec 10, 2024
1 parent e2f6ced commit 3e67663
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Resources/config/services/subscriber.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@
<tag name="kernel.event_subscriber"/>
</service>

<service id="Kiener\MolliePayments\Subscriber\OrderReturnSubscriber">
<tag name="kernel.event_subscriber"/>
</service>


</services>
</container>
6 changes: 6 additions & 0 deletions tests/PHPUnit/Service/MollieApi/ShipmentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);

Expand Down

0 comments on commit 3e67663

Please sign in to comment.