Skip to content

Commit

Permalink
[ECVS-5] added test case: thrown server exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
arslanim committed Dec 27, 2023
1 parent 2041f82 commit 0567546
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions tests/unit/services/VatNumberValidationServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1686,7 +1686,7 @@ public function getValidateVatHandlingRequestExceptionsProvidedData(): array
],
]
],
'thrownRequestException' => $this->getClientExceptionMock([
'thrownRequestException' => $this->getServerExceptionMock([
'response' => $this->getResponseMock(['body' => '{"errorWrappers": [{"error": "foo", "message": "bar"}]}']),
]),
'expectedException' => new UnknownServiceErrorException(
Expand Down Expand Up @@ -1888,29 +1888,6 @@ public function getValidateVatHandlingRequestExceptionsProvidedData(): array
null
),
],
'thrown server exception, error code set, error code INVALID_INPUT, error message set' => [
'vatNumber' => new VatNumber(
'DE',
'12312312'
),
'checkVatCallArgs' => [
$this::EXPECTED_URL_SOURCE,
[
'json' => [
'countryCode' => 'DE',
'vatNumber' => '12312312',
],
]
],
'thrownRequestException' => $this->getServerExceptionMock([
'response' => $this->getResponseMock(['body' => '{"errorWrappers": [{"error": "INVALID_INPUT", "message": "bar"}]}']),
]),
'expectedException' => new InvalidInputServiceException(
'bar',
0,
null
),
],
];
}

Expand Down

0 comments on commit 0567546

Please sign in to comment.