diff --git a/tests/Auth/AuthenticateTest.php b/tests/Auth/AuthenticateTest.php index dd47754..2ffbe5a 100644 --- a/tests/Auth/AuthenticateTest.php +++ b/tests/Auth/AuthenticateTest.php @@ -32,6 +32,7 @@ public function testAuthenticate() * @uses PsrJwt\Parser\Bearer * @uses PsrJwt\Parser\Query * @uses PsrJwt\Parser\Cookie + * @uses PsrJwt\Parser\Request */ public function testAuthenticateOk() { @@ -77,6 +78,8 @@ public function testAuthenticateOk() * @uses PsrJwt\Parser\Bearer * @uses PsrJwt\Parser\Query * @uses PsrJwt\Parser\Cookie + * @uses PsrJwt\Parser\Request + * @uses PsrJwt\Parser\ParseException */ public function testAuthenticateBadRequest() { @@ -264,6 +267,10 @@ public function testValidationResponseErrors() * @uses PsrJwt\Auth\Authenticate * @uses PsrJwt\Parser\Parse * @uses PsrJwt\Parser\Bearer + * @uses PsrJwt\Parser\Cookie + * @uses PsrJwt\Parser\Query + * @uses PsrJwt\Parser\Body + * @uses PsrJwt\Parser\Request */ public function testGetToken() { @@ -288,6 +295,9 @@ public function testGetToken() * @uses PsrJwt\Parser\Parse * @uses PsrJwt\Parser\Bearer * @uses PsrJwt\Parser\Cookie + * @uses PsrJwt\Parser\Body + * @uses PsrJwt\Parser\Query + * @uses PsrJwt\Parser\Request */ public function testGetTokenCookie() { @@ -316,6 +326,8 @@ public function testGetTokenCookie() * @uses PsrJwt\Parser\Bearer * @uses PsrJwt\Parser\Cookie * @uses PsrJwt\Parser\Body + * @uses PsrJwt\Parser\Query + * @uses PsrJwt\Parser\Request */ public function testGetTokenBody() { @@ -347,6 +359,8 @@ public function testGetTokenBody() * @uses PsrJwt\Parser\Bearer * @uses PsrJwt\Parser\Cookie * @uses PsrJwt\Parser\Body + * @uses PsrJwt\Parser\Query + * @uses PsrJwt\Parser\Request */ public function testGetTokenBodyObject() { @@ -382,6 +396,7 @@ public function testGetTokenBodyObject() * @uses PsrJwt\Parser\Cookie * @uses PsrJwt\Parser\Body * @uses PsrJwt\Parser\Query + * @uses PsrJwt\Parser\Request */ public function testGetTokenQuery() { @@ -419,6 +434,8 @@ public function testGetTokenQuery() * @uses PsrJwt\Parser\Body * @uses PsrJwt\Parser\Cookie * @uses PsrJwt\Parser\Query + * @uses PsrJwt\Parser\Request + * @uses PsrJwt\Parser\ParseException */ public function testGetTokenNoToken() { diff --git a/tests/Factory/JwtMiddlewareTest.php b/tests/Factory/JwtMiddlewareTest.php index 6ba073b..8d3ea71 100644 --- a/tests/Factory/JwtMiddlewareTest.php +++ b/tests/Factory/JwtMiddlewareTest.php @@ -39,6 +39,10 @@ public function testJwtMiddlewareHtml() * @uses PsrJwt\Parser\Bearer * @uses PsrJwt\Parser\Parse * @uses PsrJwt\Validation\Validate + * @uses PsrJwt\Parser\Body + * @uses PsrJwt\Parser\Cookie + * @uses PsrJwt\Parser\Query + * @uses PsrJwt\Parser\Request */ public function testFactoryValidation() { @@ -81,6 +85,10 @@ public function testFactoryValidation() * @uses PsrJwt\Parser\Bearer * @uses PsrJwt\Parser\Parse * @uses PsrJwt\Validation\Validate + * @uses PsrJwt\Parser\Body + * @uses PsrJwt\Parser\Cookie + * @uses PsrJwt\Parser\Query + * @uses PsrJwt\Parser\Request */ public function testJsonFactoryValidation() { diff --git a/tests/Handler/HtmlTest.php b/tests/Handler/HtmlTest.php index 243d4a8..df5d957 100644 --- a/tests/Handler/HtmlTest.php +++ b/tests/Handler/HtmlTest.php @@ -38,6 +38,7 @@ public function testAuthHandler() * @uses PsrJwt\Parser\Body * @uses PsrJwt\Parser\Query * @uses PsrJwt\Parser\Parse + * @uses PsrJwt\Parser\Request */ public function testAuthenticateOk() { @@ -86,6 +87,7 @@ public function testAuthenticateOk() * @uses PsrJwt\Parser\Body * @uses PsrJwt\Parser\Query * @uses PsrJwt\Parser\Parse + * @uses PsrJwt\Parser\Request */ public function testAuthenticateNoBody() { @@ -133,6 +135,8 @@ public function testAuthenticateNoBody() * @uses PsrJwt\Parser\Body * @uses PsrJwt\Parser\Query * @uses PsrJwt\Parser\Parse + * @uses PsrJwt\Parser\Request + * @uses PsrJwt\Parser\ParseException */ public function testAuthenticateBadRequest() { @@ -177,7 +181,10 @@ public function testAuthenticateBadRequest() * @uses PsrJwt\Validation\Validate * @uses PsrJwt\Parser\Bearer * @uses PsrJwt\Parser\Cookie + * @uses PsrJwt\Parser\Body + * @uses PsrJwt\Parser\Query * @uses PsrJwt\Parser\Parse + * @uses PsrJwt\Parser\Request */ public function testAuthenticateUnauthorized() { diff --git a/tests/Handler/JsonTest.php b/tests/Handler/JsonTest.php index 6dee4b9..897496b 100644 --- a/tests/Handler/JsonTest.php +++ b/tests/Handler/JsonTest.php @@ -38,6 +38,8 @@ public function testJsonAuthHandler() * @uses PsrJwt\Parser\Body * @uses PsrJwt\Parser\Query * @uses PsrJwt\Parser\Parse + * @uses PsrJwt\Parser\Bearer + * @uses PsrJwt\Parser\Request */ public function testAuthenticateOk() { @@ -82,7 +84,11 @@ public function testAuthenticateOk() * @uses PsrJwt\Auth\Auth * @uses PsrJwt\Validation\Validate * @uses PsrJwt\Parser\Bearer + * @uses PsrJwt\Parser\Cookie + * @uses PsrJwt\Parser\Body + * @uses PsrJwt\Parser\Query * @uses PsrJwt\Parser\Parse + * @uses PsrJwt\Parser\Request */ public function testAuthenticateFail() { diff --git a/tests/Helper/RequestTest.php b/tests/Helper/RequestTest.php index 651b2dc..022618c 100644 --- a/tests/Helper/RequestTest.php +++ b/tests/Helper/RequestTest.php @@ -16,6 +16,9 @@ class RequestTest extends TestCase 'wIjoxNTczNzE2NDA3LCJpYXQiOjE1NzM3MTU1MDcsInVzZXJfaWQiOiIzMTM4NjE2MiJ9.' . '9Es0wWdByOQAU8WfcufxgRa9GEYwLefhRzclwWcgVCQ'; + /** + * @covers PsrJwt\Helper\Request + */ public function testRequest() { $request = new Request(); @@ -23,6 +26,16 @@ public function testRequest() $this->assertInstanceOf(Request::class, $request); } + /** + * @covers PsrJwt\Helper\Request::getParsedToken + * @uses PsrJwt\Factory\Jwt + * @uses PsrJwt\Parser\Bearer + * @uses PsrJwt\Parser\Body + * @uses PsrJwt\Parser\Cookie + * @uses PsrJwt\Parser\Parse + * @uses PsrJwt\Parser\Query + * @uses PsrJwt\Parser\Request + */ public function testGetParsedToken() { $httpRequest = m::mock(ServerRequestInterface::class); diff --git a/tests/JwtAuthMiddlewareTest.php b/tests/JwtAuthMiddlewareTest.php index 4a9f266..2e1944b 100644 --- a/tests/JwtAuthMiddlewareTest.php +++ b/tests/JwtAuthMiddlewareTest.php @@ -41,6 +41,10 @@ public function testJwtAuthProcess() * @uses PsrJwt\Validation\Validate * @uses PsrJwt\Parser\Bearer * @uses PsrJwt\Handler\Html + * @uses PsrJwt\Parser\Body + * @uses PsrJwt\Parser\Cookie + * @uses PsrJwt\Parser\Query + * @uses PsrJwt\Parser\Request */ public function testProcess() { @@ -90,6 +94,8 @@ public function testProcess() * @uses PsrJwt\Parser\Cookie * @uses PsrJwt\Parser\Query * @uses PsrJwt\Handler\Html + * @uses PsrJwt\Parser\Request + * @uses PsrJwt\Parser\ParseException */ public function testProcessFail() { @@ -130,6 +136,11 @@ public function testProcessFail() * @uses PsrJwt\Validation\Validate * @uses PsrJwt\Parser\Parse * @uses PsrJwt\Parser\Bearer + * @uses PsrJwt\Parser\Query + * @uses PsrJwt\Parser\Cookie + * @uses PsrJwt\Parser\Body + * @uses PsrJwt\Handler\Html + * @uses PsrJwt\Parser\Request * @uses PsrJwt\Handler\Html */ public function testInvoke() @@ -184,6 +195,7 @@ public function testInvoke() * @uses PsrJwt\Parser\Query * @uses PsrJwt\Parser\Cookie * @uses PsrJwt\Handler\Html + * @uses PsrJwt\Parser\Request */ public function testInvokeFail() { diff --git a/tests/Parser/ParseExceptionTest.php b/tests/Parser/ParseExceptionTest.php index cdda0eb..117da48 100644 --- a/tests/Parser/ParseExceptionTest.php +++ b/tests/Parser/ParseExceptionTest.php @@ -7,6 +7,9 @@ class ParseExceptionTest extends TestCase { + /** + * @covers PsrJwt\Parser\ParseException + */ public function testParseException() { $exception = new ParseException('Error', 1, null); diff --git a/tests/Parser/ParseTest.php b/tests/Parser/ParseTest.php index 9520190..0460806 100644 --- a/tests/Parser/ParseTest.php +++ b/tests/Parser/ParseTest.php @@ -16,7 +16,7 @@ class ParseTest extends TestCase { /** - * @covers PsrJwt\Parser\Parse::__construct + * @covers PsrJwt\Parser\Parse */ public function testParse() { diff --git a/tests/Parser/RequestTest.php b/tests/Parser/RequestTest.php index cfbe35f..0396107 100644 --- a/tests/Parser/RequestTest.php +++ b/tests/Parser/RequestTest.php @@ -10,6 +10,10 @@ class RequestTest extends TestCase { + /** + * @covers PsrJwt\Parser\Request + * @uses PsrJwt\Parser\Parse + */ public function testRequest() { $parse = new Parse(); @@ -19,6 +23,14 @@ public function testRequest() $this->assertInstanceOf(Request::class, $request); } + /** + * @covers PsrJwt\Parser\Request::parse + * @uses PsrJwt\Parser\Request + * @uses PsrJwt\Parser\Bearer + * @uses PsrJwt\Parser\Cookie + * @uses PsrJwt\Parser\Body + * @uses PsrJwt\Parser\Query + */ public function testParse() { $parse = m::mock(Parse::class); @@ -36,6 +48,15 @@ public function testParse() $this->assertSame('abcdef.123.abcdef', $request->parse($httpRequest, 'jwt')); } + /** + * @covers PsrJwt\Parser\Request::parse + * @uses PsrJwt\Parser\Request + * @uses PsrJwt\Parser\Bearer + * @uses PsrJwt\Parser\Cookie + * @uses PsrJwt\Parser\Body + * @uses PsrJwt\Parser\Query + * @uses PsrJwt\Parser\ParseException + */ public function testParseNoToken() { $parse = m::mock(Parse::class);