@@ -399,11 +399,12 @@ public function testRefreshTokenValidAppToken(): void {
399399 $ this ->accessTokenMapper ->expects ($ this ->once ())
400400 ->method ('rotateToken ' )
401401 ->with (
402- $ this ->callback (function (AccessToken $ token ) {
403- return $ token ->getHashedCode () === hash ('sha512 ' , 'random128 ' ) &&
404- $ token ->getEncryptedToken () === 'newEncryptedToken ' ;
405- })
406- );
402+ 21 ,
403+ 'validrefresh ' ,
404+ 'random128 ' ,
405+ 'newEncryptedToken ' ,
406+ false ,
407+ )->willReturn (1 );
407408
408409 $ expected = new JSONResponse ([
409410 'access_token ' => 'random72 ' ,
@@ -508,11 +509,12 @@ public function testRefreshTokenValidAppTokenBasicAuth(): void {
508509 $ this ->accessTokenMapper ->expects ($ this ->once ())
509510 ->method ('rotateToken ' )
510511 ->with (
511- $ this ->callback (function (AccessToken $ token ) {
512- return $ token ->getHashedCode () === hash ('sha512 ' , 'random128 ' ) &&
513- $ token ->getEncryptedToken () === 'newEncryptedToken ' ;
514- })
515- );
512+ 21 ,
513+ 'validrefresh ' ,
514+ 'random128 ' ,
515+ 'newEncryptedToken ' ,
516+ false ,
517+ )->willReturn (1 );
516518
517519 $ expected = new JSONResponse ([
518520 'access_token ' => 'random72 ' ,
@@ -620,11 +622,12 @@ public function testRefreshTokenExpiredAppToken(): void {
620622 $ this ->accessTokenMapper ->expects ($ this ->once ())
621623 ->method ('rotateToken ' )
622624 ->with (
623- $ this ->callback (function (AccessToken $ token ) {
624- return $ token ->getHashedCode () === hash ('sha512 ' , 'random128 ' ) &&
625- $ token ->getEncryptedToken () === 'newEncryptedToken ' ;
626- })
627- );
625+ 21 ,
626+ 'validrefresh ' ,
627+ 'random128 ' ,
628+ 'newEncryptedToken ' ,
629+ false ,
630+ )->willReturn (1 );
628631
629632 $ expected = new JSONResponse ([
630633 'access_token ' => 'random72 ' ,
0 commit comments