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;
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;
['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;