diff --git a/tests/Feature/TokenServiceTest.php b/tests/Feature/TokenServiceTest.php new file mode 100644 index 00000000..01ac54d0 --- /dev/null +++ b/tests/Feature/TokenServiceTest.php @@ -0,0 +1,35 @@ + 'https://example.org', + 'client_id' => 'https://quill.p3k.io', + 'scope' => 'post' + ]; + $token = $tokenService->getNewToken($data); + $valid = $tokenService->validateToken($token); + $validData = [ + 'me' => $valid->getClaim('me'), + 'client_id' => $valid->getClaim('client_id'), + 'scope' => $valid->getClaim('scope') + ]; + $this->assertSame($data, $validData); + } +}