aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJulien Veyssier <julien-nc@posteo.net>2023-10-04 11:52:19 +0200
committerJulien Veyssier <julien-nc@posteo.net>2023-10-05 14:24:02 +0200
commit32f984c52084c3d04f579a41b704e8d30c81ed96 (patch)
tree0cecc340af142adfafd8326f2520db6e543aa8af /apps
parentc6da99474eca89cb991ca4c398c008088b324eec (diff)
downloadnextcloud-server-32f984c52084c3d04f579a41b704e8d30c81ed96.tar.gz
nextcloud-server-32f984c52084c3d04f579a41b704e8d30c81ed96.zip
adjust oauth tests
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Diffstat (limited to 'apps')
-rw-r--r--apps/oauth2/lib/Db/AccessToken.php4
-rw-r--r--apps/oauth2/tests/Db/AccessTokenMapperTest.php5
2 files changed, 5 insertions, 4 deletions
diff --git a/apps/oauth2/lib/Db/AccessToken.php b/apps/oauth2/lib/Db/AccessToken.php
index 1a31b4c2504..e0da141af3f 100644
--- a/apps/oauth2/lib/Db/AccessToken.php
+++ b/apps/oauth2/lib/Db/AccessToken.php
@@ -59,7 +59,7 @@ class AccessToken extends Entity {
$this->addType('clientId', 'int');
$this->addType('hashedCode', 'string');
$this->addType('encryptedToken', 'string');
- $this->addType('code_created_at', 'int');
- $this->addType('token_count', 'int');
+ $this->addType('codeCreatedAt', 'int');
+ $this->addType('tokenCount', 'int');
}
}
diff --git a/apps/oauth2/tests/Db/AccessTokenMapperTest.php b/apps/oauth2/tests/Db/AccessTokenMapperTest.php
index 013eb72919a..b7de147963a 100644
--- a/apps/oauth2/tests/Db/AccessTokenMapperTest.php
+++ b/apps/oauth2/tests/Db/AccessTokenMapperTest.php
@@ -25,6 +25,7 @@ namespace OCA\OAuth2\Tests\Db;
use OCA\OAuth2\Db\AccessToken;
use OCA\OAuth2\Db\AccessTokenMapper;
+use OCP\AppFramework\Utility\ITimeFactory;
use Test\TestCase;
/**
@@ -36,7 +37,7 @@ class AccessTokenMapperTest extends TestCase {
protected function setUp(): void {
parent::setUp();
- $this->accessTokenMapper = new AccessTokenMapper(\OC::$server->getDatabaseConnection());
+ $this->accessTokenMapper = new AccessTokenMapper(\OC::$server->getDatabaseConnection(), \OC::$server->get(ITimeFactory::class));
}
public function testGetByCode() {
@@ -54,7 +55,7 @@ class AccessTokenMapperTest extends TestCase {
$this->accessTokenMapper->delete($token);
}
-
+
public function testDeleteByClientId() {
$this->expectException(\OCA\OAuth2\Exceptions\AccessTokenNotFoundException::class);