From 36c55fcf365a3635d3dfe9b52151f33d7115af93 Mon Sep 17 00:00:00 2001 From: James Seconde Date: Mon, 2 Oct 2023 10:00:28 +0100 Subject: [PATCH] Add checkURL into fixture for test (#437) --- test/Verify2/ClientTest.php | 4 +++- .../Responses/verify-silent-auth-request-success.json | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 test/Verify2/Fixtures/Responses/verify-silent-auth-request-success.json diff --git a/test/Verify2/ClientTest.php b/test/Verify2/ClientTest.php index 71f286f1..2193dcff 100644 --- a/test/Verify2/ClientTest.php +++ b/test/Verify2/ClientTest.php @@ -423,11 +423,13 @@ public function testCanRequestSilentAuth(): void $this->assertEquals('POST', $request->getMethod()); return true; - }))->willReturn($this->getResponse('verify-request-success', 202)); + }))->willReturn($this->getResponse('verify-silent-auth-request-success', 202)); $result = $this->verify2Client->startVerification($silentAuthRequest); $this->assertIsArray($result); $this->assertArrayHasKey('request_id', $result); + $this->assertArrayHasKey('check_url', $result); + $this->assertEquals('https://api.nexmo.com/v2/verify/c11236f4-00bf-4b89-84ba-88b25df97315/silent-auth/redirect', $result['check_url']); } public function testCannotSendConcurrentVerifications(): void diff --git a/test/Verify2/Fixtures/Responses/verify-silent-auth-request-success.json b/test/Verify2/Fixtures/Responses/verify-silent-auth-request-success.json new file mode 100644 index 00000000..6c60e5c0 --- /dev/null +++ b/test/Verify2/Fixtures/Responses/verify-silent-auth-request-success.json @@ -0,0 +1,4 @@ +{ + "request_id": "c11236f4-00bf-4b89-84ba-88b25df97315", + "check_url": "https://api.nexmo.com/v2/verify/c11236f4-00bf-4b89-84ba-88b25df97315/silent-auth/redirect" +} \ No newline at end of file