Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-12-02 12:39:49 +0300
committerJoas Schilling <coding@schilljs.com>2021-12-02 12:39:49 +0300
commit617528312ab6a899bab78ef5f320571d8c406fd3 (patch)
treec15b109efcc06a494f097350e5b295f8facc6974 /apps/oauth2/tests
parent3e20cffc86c786a023fcdbddafe905f7ed9e6fc2 (diff)
Fix last tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/oauth2/tests')
-rw-r--r--apps/oauth2/tests/Controller/OauthApiControllerTest.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/oauth2/tests/Controller/OauthApiControllerTest.php b/apps/oauth2/tests/Controller/OauthApiControllerTest.php
index e723877a7b4..24385e785e5 100644
--- a/apps/oauth2/tests/Controller/OauthApiControllerTest.php
+++ b/apps/oauth2/tests/Controller/OauthApiControllerTest.php
@@ -27,8 +27,8 @@ namespace OCA\OAuth2\Tests\Controller;
use OC\Authentication\Exceptions\ExpiredTokenException;
use OC\Authentication\Exceptions\InvalidTokenException;
-use OC\Authentication\Token\DefaultToken;
use OC\Authentication\Token\IProvider as TokenProvider;
+use OC\Authentication\Token\PublicKeyToken;
use OC\Security\Bruteforce\Throttler;
use OCA\OAuth2\Controller\OauthApiController;
use OCA\OAuth2\Db\AccessToken;
@@ -238,7 +238,7 @@ class OauthApiControllerTest extends TestCase {
'validrefresh'
)->willReturn('decryptedToken');
- $appToken = new DefaultToken();
+ $appToken = new PublicKeyToken();
$appToken->setUid('userId');
$this->tokenProvider->method('getTokenById')
->with(1337)
@@ -267,7 +267,7 @@ class OauthApiControllerTest extends TestCase {
$this->tokenProvider->expects($this->once())
->method('updateToken')
->with(
- $this->callback(function (DefaultToken $token) {
+ $this->callback(function (PublicKeyToken $token) {
return $token->getExpires() === 4600;
})
);
@@ -330,7 +330,7 @@ class OauthApiControllerTest extends TestCase {
'validrefresh'
)->willReturn('decryptedToken');
- $appToken = new DefaultToken();
+ $appToken = new PublicKeyToken();
$appToken->setUid('userId');
$this->tokenProvider->method('getTokenById')
->with(1337)
@@ -359,7 +359,7 @@ class OauthApiControllerTest extends TestCase {
$this->tokenProvider->expects($this->once())
->method('updateToken')
->with(
- $this->callback(function (DefaultToken $token) {
+ $this->callback(function (PublicKeyToken $token) {
return $token->getExpires() === 4600;
})
);
@@ -425,7 +425,7 @@ class OauthApiControllerTest extends TestCase {
'validrefresh'
)->willReturn('decryptedToken');
- $appToken = new DefaultToken();
+ $appToken = new PublicKeyToken();
$appToken->setUid('userId');
$this->tokenProvider->method('getTokenById')
->with(1337)
@@ -454,7 +454,7 @@ class OauthApiControllerTest extends TestCase {
$this->tokenProvider->expects($this->once())
->method('updateToken')
->with(
- $this->callback(function (DefaultToken $token) {
+ $this->callback(function (PublicKeyToken $token) {
return $token->getExpires() === 4600;
})
);