Skip to content

Commit

Permalink
fix: Wrong token cache test assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndiritu committed Nov 26, 2024
1 parent 5fa3df1 commit 2df52a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/GraphServiceClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ function (RequestInterface $request) {

// cache is populated
$this->assertInstanceOf(AccessToken::class, $customCache->getTokenWithContext($tokenRequestContext));
$this->assertEquals($this->testJWT, $customCache->getTokenWithContext($tokenRequestContext)->getToken());

// hydrate another cache for follow-up request
$newCache = new InMemoryAccessTokenCache($tokenRequestContext, $customCache->getTokenWithContext($tokenRequestContext));
Expand All @@ -119,6 +120,6 @@ function (RequestInterface $request) {

$me = $client->me()->get()->wait();
// cache is populated
$this->assertInstanceOf(AccessToken::class, $customCache->getTokenWithContext($tokenRequestContext));
$this->assertInstanceOf(AccessToken::class, $newCache->getTokenWithContext($tokenRequestContext));
}
}

0 comments on commit 2df52a1

Please sign in to comment.