Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use OCP\Activity\IManager;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Services\IAppConfig;
use OCP\Authentication\Exceptions\WipeTokenException;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IRequest;
Expand Down Expand Up @@ -243,7 +244,7 @@ public function testDestroyWipePendingEmitsCancelledSubject(): void {
$this->tokenProvider->expects($this->once())
->method('getTokenById')
->with($tokenId)
->willThrowException(new \OCP\Authentication\Exceptions\WipeTokenException($token));
->willThrowException(new WipeTokenException($token));

// The token is still invalidated (the user opted into cancelling the wipe).
$this->tokenProvider->expects($this->once())
Expand Down
3 changes: 2 additions & 1 deletion tests/lib/BackgroundJob/DummyJob.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace Test\BackgroundJob;

use OCP\BackgroundJob\IJob;
Expand Down
3 changes: 2 additions & 1 deletion tests/lib/OCM/OCMSignatoryManagerJwksTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

namespace Test\OCM;

use OC\Memcache\ArrayCache;
use OC\OCM\OCMSignatoryManager;
use OC\Security\IdentityProof\Manager as IdentityProofManager;
use OCP\Http\Client\IClient;
Expand Down Expand Up @@ -54,7 +55,7 @@ protected function setUp(): void {
$this->clientService->method('newClient')->willReturn($this->client);

$cacheFactory = $this->createMock(ICacheFactory::class);
$cacheFactory->method('createDistributed')->willReturn(new \OC\Memcache\ArrayCache(''));
$cacheFactory->method('createDistributed')->willReturn(new ArrayCache(''));

$this->signatoryManager = new OCMSignatoryManager(
$this->appConfig,
Expand Down
5 changes: 3 additions & 2 deletions tests/lib/OCM/OCMSignatoryManagerRotationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

namespace Test\OCM;

use OC\Memcache\ArrayCache;
use OC\OCM\OCMSignatoryManager;
use OC\Security\IdentityProof\Key;
use OC\Security\IdentityProof\Manager as IdentityProofManager;
Expand Down Expand Up @@ -50,7 +51,7 @@ protected function setUp(): void {
->willReturnCallback(static fn (string $suffix): string => 'https://alice.example/' . ltrim($suffix, '/'));

$cacheFactory = $this->createMock(ICacheFactory::class);
$cacheFactory->method('createDistributed')->willReturn(new \OC\Memcache\ArrayCache(''));
$cacheFactory->method('createDistributed')->willReturn(new ArrayCache(''));

$this->signatoryManager = new OCMSignatoryManager(
$this->appConfig,
Expand Down Expand Up @@ -194,7 +195,7 @@ public function testSignerReturnsNullWhenIdentityCannotBeDerived(): void {
->willThrowException(new IdentityNotFoundException('no url either'));

$cacheFactory = $this->createMock(ICacheFactory::class);
$cacheFactory->method('createDistributed')->willReturn(new \OC\Memcache\ArrayCache(''));
$cacheFactory->method('createDistributed')->willReturn(new ArrayCache(''));

$manager = new OCMSignatoryManager(
$this->appConfig,
Expand Down
Loading