Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenclouston committed Dec 8, 2024
1 parent e412484 commit 406b637
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/AuthsignalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function testGetUser() {
"accessToken" => "xxxx",
"url" => "wwwww");

self::$server->setResponseOfPath("/v1/users/123%3Atest", new Response(json_encode($mockedResponse)));
self::$server->setResponseOfPath("/users/123%3Atest", new Response(json_encode($mockedResponse)));

$params = array(
"userId" => "123:test",
Expand All @@ -46,7 +46,7 @@ public function testUpdateUser() {
"email" => "updated_email",
);

self::$server->setResponseOfPath("/v1/users/550e8400-e29b-41d4-a716-446655440000", new Response(json_encode($mockedResponse)));
self::$server->setResponseOfPath("/users/550e8400-e29b-41d4-a716-446655440000", new Response(json_encode($mockedResponse)));

$params = array(
"userId" => "550e8400-e29b-41d4-a716-446655440000",
Expand All @@ -64,7 +64,7 @@ public function testUpdateUser() {
public function testDeleteUser() {
$mockedResponse = array("success" => true);

self::$server->setResponseOfPath("/v1/users/1234", new Response(json_encode($mockedResponse), [], 200));
self::$server->setResponseOfPath("/users/1234", new Response(json_encode($mockedResponse), [], 200));

$params = array("userId" => "1234");
$response = Authsignal::deleteUser($params);
Expand All @@ -88,7 +88,7 @@ public function testGetAuthenticators() {
)
);

self::$server->setResponseOfPath("/v1/users/123%3Atest/authenticators", new Response(json_encode($mockedResponse)));
self::$server->setResponseOfPath("/users/123%3Atest/authenticators", new Response(json_encode($mockedResponse)));

$params = array(
"userId" => "123:test"
Expand All @@ -112,7 +112,7 @@ public function testEnrollVerifiedAuthenticator() {
"createdAt"=> "2022-07-25T03:31:36.219Z",
"oobChannel"=> "SMS"));

self::$server->setResponseOfPath("/v1/users/123%3Atest/authenticators", new Response(json_encode($mockedResponse)));
self::$server->setResponseOfPath("/users/123%3Atest/authenticators", new Response(json_encode($mockedResponse)));

$params = array(
"userId" => "123:test",
Expand All @@ -130,7 +130,7 @@ public function testEnrollVerifiedAuthenticator() {
public function testDeleteAuthenticator() {
$mockedResponse = array("success" => true);

self::$server->setResponseOfPath("/v1/users/123%3Atest/authenticators/456%3Atest", new Response(json_encode($mockedResponse), [], 200));
self::$server->setResponseOfPath("/users/123%3Atest/authenticators/456%3Atest", new Response(json_encode($mockedResponse), [], 200));

$params = array(
"userId" => "123:test",
Expand All @@ -148,7 +148,7 @@ public function testTrackAction() {
"idempotencyKey" => "5924a649-b5d3-4baf-a4ab-4b812dde97a0",
"ruleIds" => []);

self::$server->setResponseOfPath('/v1/users/123%3Atest/actions/signIn', new Response(json_encode($mockedResponse)));
self::$server->setResponseOfPath('/users/123%3Atest/actions/signIn', new Response(json_encode($mockedResponse)));

$params = array(
"userId" => "123:test",
Expand Down Expand Up @@ -182,7 +182,7 @@ public function testValidateChallenge() {
"action" => "signIn",
"verificationMethod" => "AUTHENTICATOR_APP");

self::$server->setResponseOfPath("/v1/validate", new Response(json_encode($mockedResponse)));
self::$server->setResponseOfPath("/validate", new Response(json_encode($mockedResponse)));

$key = "secret";
$testTokenPayload = [
Expand Down Expand Up @@ -217,7 +217,7 @@ public function testGetAction() {
"createdAt" => "2022-07-25T03:19:00.316Z",
"ruleIds" => []);

self::$server->setResponseOfPath("/v1/users/123%3Atest/actions/signIn/5924a649-b5d3-4baf-a4ab-4b812dde97a04", new Response(json_encode($mockedResponse)));
self::$server->setResponseOfPath("/users/123%3Atest/actions/signIn/5924a649-b5d3-4baf-a4ab-4b812dde97a04", new Response(json_encode($mockedResponse)));

$params = array(
"userId" => "123:test",
Expand All @@ -240,7 +240,7 @@ public function testUpdateAction() {
"state" => "CHALLENGE_FAILED"
);

self::$server->setResponseOfPath("/v1/users/123%3Atest/actions/signIn/5924a649-b5d3-4baf-a4ab-4b812dde97a0", new Response(json_encode($mockedResponse)));
self::$server->setResponseOfPath("/users/123%3Atest/actions/signIn/5924a649-b5d3-4baf-a4ab-4b812dde97a0", new Response(json_encode($mockedResponse)));

$params = array(
"userId" => "123:test",
Expand Down

0 comments on commit 406b637

Please sign in to comment.