diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-11-11 11:46:49 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-11 11:46:49 +0300 |
commit | cc8322214cc6382edfdbe92e0af120299cc3909c (patch) | |
tree | 1d96f68ffcf8abe6477cb071ecdd6b104132bfc6 | |
parent | 96855d73a23dd702653674031ee4e1e78a7f7c66 (diff) | |
parent | 9d0e79f10d177d26902cfa5d37ca2aec5bf75c77 (diff) |
Merge pull request #35077 from nextcloud/fix/public-key-token-provider-test
Fix PublicKeyTokenProviderTest import and mock
-rw-r--r-- | tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php index ce739a74bb8..d6e8dba31be 100644 --- a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php +++ b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php @@ -36,6 +36,7 @@ use OC\Authentication\Token\PublicKeyTokenProvider; use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Utility\ITimeFactory; use OCP\IConfig; +use OCP\IDBConnection; use OCP\Security\ICrypto; use PHPUnit\Framework\MockObject\MockObject; use Psr\Log\LoggerInterface; @@ -50,7 +51,7 @@ class PublicKeyTokenProviderTest extends TestCase { private $crypto; /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; - /** @var IDBConnection|IDBConnection|MockObject */ + /** @var IDBConnection|MockObject */ private IDBConnection $db; /** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ private $logger; @@ -73,9 +74,6 @@ class PublicKeyTokenProviderTest extends TestCase { ['openssl', [], []], ]); $this->db = $this->createMock(IDBConnection::class); - $this->db->method('atomic')->willReturnCallback(function ($cb) { - return $cb(); - }); $this->logger = $this->createMock(LoggerInterface::class); $this->timeFactory = $this->createMock(ITimeFactory::class); $this->time = 1313131; |