From 6d014b676ee04f406798a4ca7c6dd1cfdb4f731e Mon Sep 17 00:00:00 2001 From: markernst97 Date: Thu, 12 Oct 2023 14:41:38 +0200 Subject: [PATCH] test: add test --- .../Repository/CreateConceptsTest.php | 12 ++++++++++ ...ith_address1_and_address2_combined__1.json | 23 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 tests/__snapshots__/CreateConceptsTest__it_creates_a_valid_request_from_a_shipment_collection_with_data_set_address_with_address1_and_address2_combined__1.json diff --git a/tests/Unit/Shipment/Repository/CreateConceptsTest.php b/tests/Unit/Shipment/Repository/CreateConceptsTest.php index 12b6b6053..27f85c0db 100644 --- a/tests/Unit/Shipment/Repository/CreateConceptsTest.php +++ b/tests/Unit/Shipment/Repository/CreateConceptsTest.php @@ -81,6 +81,18 @@ ], ], ], + 'address with address1 and address2 combined' => [ + 'input' => [ + [ + 'carrier' => ['id' => Carrier::CARRIER_POSTNL_ID], + 'recipient' => array_merge(DEFAULT_INPUT_RECIPIENT, [ + 'address1' => 'Tuinstraat', + 'address2' => '35', + ]), + ], + ], + ], + 'simple domestic shipment' => [ 'input' => [ [ diff --git a/tests/__snapshots__/CreateConceptsTest__it_creates_a_valid_request_from_a_shipment_collection_with_data_set_address_with_address1_and_address2_combined__1.json b/tests/__snapshots__/CreateConceptsTest__it_creates_a_valid_request_from_a_shipment_collection_with_data_set_address_with_address1_and_address2_combined__1.json new file mode 100644 index 000000000..2d71610ea --- /dev/null +++ b/tests/__snapshots__/CreateConceptsTest__it_creates_a_valid_request_from_a_shipment_collection_with_data_set_address_with_address1_and_address2_combined__1.json @@ -0,0 +1,23 @@ +[ + { + "carrier": 1, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 2 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "NL", + "city": "Hoofddorp", + "person": "Jaap Krekel", + "postal_code": "2132JE", + "street": "Tuinstraat 35", + "street_additional_info": "35" + } + } +]