Skip to content

Commit 12ccf64

Browse files
Fix PublicKeyTokenProviderTest import and mock
* IDBConnection import missing * Atomic doesn't need a mock Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
1 parent cfa291e commit 12ccf64

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
use OCP\AppFramework\Db\DoesNotExistException;
3737
use OCP\AppFramework\Utility\ITimeFactory;
3838
use OCP\IConfig;
39+
use OCP\IDBConnection;
3940
use OCP\Security\ICrypto;
4041
use PHPUnit\Framework\MockObject\MockObject;
4142
use Psr\Log\LoggerInterface;
@@ -73,9 +74,6 @@ protected function setUp(): void {
7374
['openssl', [], []],
7475
]);
7576
$this->db = $this->createMock(IDBConnection::class);
76-
$this->db->method('atomic')->willReturnCallback(function ($cb) {
77-
return $cb();
78-
});
7977
$this->logger = $this->createMock(LoggerInterface::class);
8078
$this->timeFactory = $this->createMock(ITimeFactory::class);
8179
$this->time = 1313131;

0 commit comments

Comments
 (0)