@@ -51,6 +51,7 @@ public function testRespondToRequest()
51
51
$ scopeEntity ->setIdentifier ('foo ' );
52
52
$ scopeRepositoryMock = $ this ->getMockBuilder (ScopeRepositoryInterface::class)->getMock ();
53
53
$ scopeRepositoryMock ->method ('getScopeEntityByIdentifier ' )->willReturn ($ scopeEntity );
54
+ $ scopeRepositoryMock ->method ('finalizeScopes ' )->willReturn ([$ scopeEntity ]);
54
55
55
56
$ accessTokenRepositoryMock = $ this ->getMockBuilder (AccessTokenRepositoryInterface::class)->getMock ();
56
57
$ accessTokenRepositoryMock ->method ('getNewToken ' )->willReturn (new AccessTokenEntity ());
@@ -107,6 +108,7 @@ public function testRespondToRequestNullRefreshToken()
107
108
108
109
$ scopeRepositoryMock = $ this ->getMockBuilder (ScopeRepositoryInterface::class)->getMock ();
109
110
$ scopeRepositoryMock ->method ('getScopeEntityByIdentifier ' )->willReturn ($ scopeEntity );
111
+ $ scopeRepositoryMock ->method ('finalizeScopes ' )->willReturn ([$ scopeEntity ]);
110
112
111
113
$ accessTokenRepositoryMock = $ this ->getMockBuilder (AccessTokenRepositoryInterface::class)->getMock ();
112
114
$ accessTokenRepositoryMock ->method ('getNewToken ' )->willReturn (new AccessTokenEntity ());
@@ -169,6 +171,7 @@ public function testRespondToReducedScopes()
169
171
$ scope ->setIdentifier ('foo ' );
170
172
$ scopeRepositoryMock = $ this ->getMockBuilder (ScopeRepositoryInterface::class)->getMock ();
171
173
$ scopeRepositoryMock ->method ('getScopeEntityByIdentifier ' )->willReturn ($ scope );
174
+ $ scopeRepositoryMock ->method ('finalizeScopes ' )->willReturn ([$ scope ]);
172
175
173
176
$ grant = new RefreshTokenGrant ($ refreshTokenRepositoryMock );
174
177
$ grant ->setClientRepository ($ clientRepositoryMock );
@@ -479,7 +482,7 @@ public function testRespondToRequestFinalizeScopes()
479
482
$ grant ->setScopeRepository ($ scopeRepositoryMock );
480
483
$ grant ->setAccessTokenRepository ($ accessTokenRepositoryMock );
481
484
$ grant ->setEncryptionKey ($ this ->cryptStub ->getKey ());
482
- $ grant ->setPrivateKey (new CryptKey ('file:// ' . __DIR__ . '/../Stubs/private.key ' , null , false ));
485
+ $ grant ->setPrivateKey (new CryptKey ('file:// ' . __DIR__ . '/../Stubs/private.key ' ));
483
486
484
487
485
488
$ scopes = [$ fooScopeEntity , $ barScopeEntity ];
0 commit comments