diff --git a/phpunit.xml b/phpunit.xml
index fe461e65..49624a07 100755
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -21,6 +21,6 @@
-
+
diff --git a/src/DocScan/Session/Retrieve/StaticLivenessResourceResponse.php b/src/DocScan/Session/Retrieve/StaticLivenessResourceResponse.php
index ada82639..23ef6dbf 100644
--- a/src/DocScan/Session/Retrieve/StaticLivenessResourceResponse.php
+++ b/src/DocScan/Session/Retrieve/StaticLivenessResourceResponse.php
@@ -11,6 +11,10 @@ class StaticLivenessResourceResponse extends LivenessResourceResponse
*/
private $image;
+ /**
+ * @var string|null
+ */
+ private $captureType;
/**
* StaticLivenessResourceResponse constructor.
@@ -24,6 +28,8 @@ public function __construct(array $zoomLiveness)
if (isset($zoomLiveness['image'])) {
$this->image = new MediaResponse($zoomLiveness['image']['media']);
}
+
+ $this->captureType = $zoomLiveness['capture_type'] ?? null;
}
/**
@@ -33,4 +39,12 @@ public function getImage(): ?MediaResponse
{
return $this->image;
}
+
+ /**
+ * @return string|null
+ */
+ public function getCaptureType(): ?string
+ {
+ return $this->captureType;
+ }
}
diff --git a/tests/DocScan/Session/Retrieve/StaticLivenessResourceResponseTest.php b/tests/DocScan/Session/Retrieve/StaticLivenessResourceResponseTest.php
index 6e280f90..d5e37c39 100644
--- a/tests/DocScan/Session/Retrieve/StaticLivenessResourceResponseTest.php
+++ b/tests/DocScan/Session/Retrieve/StaticLivenessResourceResponseTest.php
@@ -13,17 +13,20 @@ class StaticLivenessResourceResponseTest extends TestCase
{
private const SOME_LIVENESS_TYPE = 'someLivenessType';
private const SOME_ID = '493ru49358gh945fh305';
+ private const SOME_CAPTURE_TYPE = 'someCaptureType';
/**
* @test
* @covers ::__construct
* @covers ::getLivenessType
* @covers ::getImage
+ * @covers ::getCaptureType
*/
public function shouldBuildCorrectly()
{
$input = [
'liveness_type' => self::SOME_LIVENESS_TYPE,
+ 'capture_type' => self::SOME_CAPTURE_TYPE,
'image' => [
'media' => [
'id' => self::SOME_ID,
@@ -38,6 +41,7 @@ public function shouldBuildCorrectly()
$result = new StaticLivenessResourceResponse($input);
$this->assertEquals(self::SOME_LIVENESS_TYPE, $result->getLivenessType());
+ $this->assertEquals(self::SOME_CAPTURE_TYPE, $result->getCaptureType());
$this->assertEquals(self::SOME_ID, $result->getImage()->getId());
$this->assertNotNull($result->getImage());
$this->assertInstanceOf(MediaResponse::class, $result->getImage());
@@ -48,6 +52,7 @@ public function shouldBuildCorrectly()
* @covers ::__construct
* @covers ::getLivenessType
* @covers ::getImage
+ * @covers ::getCaptureType
*/
public function shouldNotThrowExceptionIfMissingValues()
{
@@ -55,5 +60,6 @@ public function shouldNotThrowExceptionIfMissingValues()
$this->assertNull($result->getLivenessType());
$this->assertNull($result->getImage());
+ $this->assertNull($result->getCaptureType());
}
}