From 7b6855e0f126820be0a0ac54c24f78a5392004ad Mon Sep 17 00:00:00 2001 From: Arslan Imamutdinov Date: Thu, 28 Dec 2023 14:42:28 +0400 Subject: [PATCH] [ECVS-5] added test case: response country code empty, vat number empty, request date empty, is valid, name empty, address empty. --- .../VatNumberValidationServiceTest.php | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/unit/services/VatNumberValidationServiceTest.php b/tests/unit/services/VatNumberValidationServiceTest.php index 3f3d05a..ba96af6 100644 --- a/tests/unit/services/VatNumberValidationServiceTest.php +++ b/tests/unit/services/VatNumberValidationServiceTest.php @@ -177,6 +177,29 @@ public function getCheckVatProvidedData(): array '' ), ], + 'response country code empty, vat number empty, request date empty, is valid, name empty, address empty' => [ + 'vatNumber' => new VatNumber( + 'DE', + '12312312' + ), + 'checkVatCallArgs' => [ + $this::EXPECTED_URL_SOURCE, + [ + 'json' => [ + 'countryCode' => 'DE', + 'vatNumber' => '12312312', + ], + ] + ], + 'checkVatResponse' => '{"countryCode": "", "vatNumber": "", "requestDate": "", "valid": true, "name": "", "address": ""}', + 'expectedVatNumberValidationResult' => new VatNumberValidationResult( + new VatNumber('', ''), + '', + true, + '', + '' + ), + ], ]; }