Skip to content

Commit

Permalink
SDK-2377 added failure reasons to idv
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmet-yoti committed Jun 20, 2024
1 parent 6748e2d commit 2cb05e6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .php-cs-fixer.cache

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ class FailureReasonResponse
* @var RequirementNotMetDetails
*/
private $requirementsNotMetDetails;
/**
* @param array<string, mixed> $data
*/
public function __construct(array $data)
{
$this->reasonCode = $data["reason_code"];
Expand All @@ -32,5 +35,4 @@ public function getRequirementNotMetDetails(): RequirementNotMetDetails
{
return $this->requirementsNotMetDetails;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class RequirementNotMetDetails
private $details;

/**
* @param array $data
* @param array<int, array<string, string>> $data
*/
public function __construct(array $data)
{
Expand Down Expand Up @@ -72,5 +72,4 @@ public function getDocumentType(): string
{
return $this->documentType;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ public function shouldCreatedCorrectly(): void
$this->assertEquals((object)self::IDENTITY_PROFILE_REPORT, $result->getIdentityProfileReport());
$this->assertInstanceOf(FailureReasonResponse::class, $result->getFailureReason());
$this->assertEquals(self::REASON_CODE, $result->getFailureReason()->getReasonCode());
$this->assertEquals(self::FAILURE_TYPE, $result->getFailureReason()->getRequirementNotMetDetails()->getFailureType());
//$this->assertEquals(self::DOCUMENT_TYPE, $result->getFailureReason()->getRequirementNotMetDetails()->getDocumentType());
//$this->assertEquals(self::AUDIT_ID, $result->getFailureReason()->getRequirementNotMetDetails()->getAuditId());
//$this->assertEquals(self::DETAILS, $result->getFailureReason()->getRequirementNotMetDetails()->getDetails());
$reqNotMet = $result->getFailureReason()->getRequirementNotMetDetails();
$this->assertEquals(self::FAILURE_TYPE, $reqNotMet->getFailureType());
$this->assertEquals(self::DOCUMENT_TYPE, $reqNotMet->getDocumentType());
$this->assertEquals(self::AUDIT_ID, $reqNotMet->getAuditId());
$this->assertEquals(self::DETAILS, $reqNotMet->getDetails());
}
}

0 comments on commit 2cb05e6

Please sign in to comment.