99use League \OAuth2 \Server \Entities \RefreshTokenEntityInterface ;
1010use League \OAuth2 \Server \Grant \RefreshTokenGrant ;
1111use League \OAuth2 \Server \Repositories \AccessTokenRepositoryInterface ;
12+ use League \OAuth2 \Server \Repositories \ClaimRepositoryInterface ;
1213use League \OAuth2 \Server \Repositories \ClientRepositoryInterface ;
1314use League \OAuth2 \Server \Repositories \RefreshTokenRepositoryInterface ;
1415use League \OAuth2 \Server \Repositories \ScopeRepositoryInterface ;
@@ -52,6 +53,9 @@ public function testRespondToRequest()
5253 $ scopeRepositoryMock = $ this ->getMockBuilder (ScopeRepositoryInterface::class)->getMock ();
5354 $ scopeRepositoryMock ->method ('getScopeEntityByIdentifier ' )->willReturn ($ scopeEntity );
5455
56+ $ claimRepositoryMock = $ this ->getMockBuilder (ClaimRepositoryInterface::class)->getMock ();
57+ $ claimRepositoryMock ->method ('getClaims ' )->willReturn ([]);
58+
5559 $ accessTokenRepositoryMock = $ this ->getMockBuilder (AccessTokenRepositoryInterface::class)->getMock ();
5660 $ accessTokenRepositoryMock ->method ('getNewToken ' )->willReturn (new AccessTokenEntity ());
5761 $ accessTokenRepositoryMock ->expects ($ this ->once ())->method ('persistNewAccessToken ' )->willReturnSelf ();
@@ -63,6 +67,7 @@ public function testRespondToRequest()
6367 $ grant = new RefreshTokenGrant ($ refreshTokenRepositoryMock );
6468 $ grant ->setClientRepository ($ clientRepositoryMock );
6569 $ grant ->setScopeRepository ($ scopeRepositoryMock );
70+ $ grant ->setClaimRepository ($ claimRepositoryMock );
6671 $ grant ->setAccessTokenRepository ($ accessTokenRepositoryMock );
6772 $ grant ->setEncryptionKey ($ this ->cryptStub ->getKey ());
6873 $ grant ->setPrivateKey (new CryptKey ('file:// ' . __DIR__ . '/../Stubs/private.key ' ));
0 commit comments