diff --git a/config/validation/myparcel/order.php b/config/validation/myparcel/order.php index 903b365ec..e18dde425 100644 --- a/config/validation/myparcel/order.php +++ b/config/validation/myparcel/order.php @@ -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, ], ], ], diff --git a/tests/Unit/Validation/ValidationTest.php b/tests/Unit/Validation/ValidationTest.php index d8f3c117c..bf7f66fbc 100644 --- a/tests/Unit/Validation/ValidationTest.php +++ b/tests/Unit/Validation/ValidationTest.php @@ -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, @@ -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', - ] + ], ] - ) - ] + ), + ], ] );