Skip to content

Commit

Permalink
feat: add options for small package Belgium (#290)
Browse files Browse the repository at this point in the history
INT-536
  • Loading branch information
GravendeelJochem authored Aug 2, 2024
1 parent 4d1d6f3 commit 6978955
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
1 change: 1 addition & 0 deletions config/validation/myparcel/order.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
DeliveryOptions::PACKAGE_TYPE_LETTER_NAME,
DeliveryOptions::PACKAGE_TYPE_MAILBOX_NAME,
DeliveryOptions::PACKAGE_TYPE_PACKAGE_NAME,
DeliveryOptions::PACKAGE_TYPE_PACKAGE_SMALL_NAME,
],
],
],
Expand Down
35 changes: 24 additions & 11 deletions tests/Unit/Validation/ValidationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,19 @@ function arrayMergeOrder(array ...$arrays): array
]
),
],
'BE small package' => [
'input' => arrayMergeOrder(
STANDARD_INPUT,
[
'recipient' => [
'cc' => 'BE',
],
'deliveryOptions' => [
'packageType' => DeliveryOptions::PACKAGE_TYPE_PACKAGE_SMALL_NAME,
],
]
),
],
'EU package without insurance' => [
'input' => arrayMergeOrder(
STANDARD_INPUT,
Expand Down Expand Up @@ -383,34 +396,34 @@ function arrayMergeOrder(array ...$arrays): array
]
),
],
'allows property tracked' => [
'allows property tracked' => [
'input' => arrayMergeOrder(
STANDARD_INPUT,
[
'deliveryOptions' => [
'shipmentOptions' => [
'tracked' => 1,
]
]
],
],
]
)
),
],
'Small packets not NL tracked' => [
'Small packets not NL tracked' => [
'input' => arrayMergeOrder(
STANDARD_INPUT,
[
'deliveryOptions' => [
'packageType' => DeliveryOptions::PACKAGE_TYPE_PACKAGE_SMALL_NAME,
'packageType' => DeliveryOptions::PACKAGE_TYPE_PACKAGE_SMALL_NAME,
'shipmentOptions' => [
'tracked' => 0,
]
],
],
'recipient' => [
'recipient' => [
'cc' => 'FR',
]
],
]
)
]
),
],
]
);

0 comments on commit 6978955

Please sign in to comment.