Improved some tests, got to 95% coverage

This commit is contained in:
Barnaby Walters
2021-06-13 15:30:58 +02:00
parent ca1819776e
commit bf16d0eb55
3 changed files with 82 additions and 1 deletions

View File

@@ -801,6 +801,16 @@ EOT
$this->assertEquals($authCodeData['me'], $resJson['me']);
$this->assertEquals($authCodeData['profile'], $resJson['profile']);
$this->assertTrue(scopeEquals($authCodeData['scope'], $resJson['scope']));
// Make sure we can fetch the token from the token storage.
$accessToken = $s->getTokenStorage()->getAccessToken($resJson['access_token']);
$this->assertNotNull($accessToken);
$this->assertEquals($accessToken['me'], $authCodeData['me']);
$this->assertEquals($accessToken['scope'], $authCodeData['scope']);
// Make sure we can revoke the token and no longer fetch it.
$this->assertTrue($s->getTokenStorage()->revokeAccessToken($resJson['access_token']));
$this->assertNull($s->getTokenStorage()->getAccessToken($resJson['access_token']));
}
/**