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:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2022-11-10 17:36:24 +0300
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2022-11-11 12:34:59 +0300
commitf2cc09fef11fcabe8e4eba9ecc66e84cf7b8fa90 (patch)
treec4960227413cc5da6b77bb8cbfdf14056945e9a4
parent4f489a66947a8fdbb873a6d6de91b7ec6db6bfb0 (diff)
Fix PublicKeyTokenProviderTest import and mock
* IDBConnection import missing * Atomic doesn't need a mock Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r--tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php
index 2e39bbaa8db..d9135d7e2c4 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;