Skip to content

Commit

Permalink
fix(tests): add missing import for IURLGenerator in SettingsControlle…
Browse files Browse the repository at this point in the history
…rTest

- Added missing use statement for IURLGenerator
- Ensured all required interfaces are properly mocked

Signed-off-by: ernolf <raphael.gradenwitz@googlemail.com>
  • Loading branch information
ernolf committed Jul 22, 2024
1 parent c3cdce8 commit d4ce413
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/Unit/Controller/SettingsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use OCP\AppFramework\Http\JSONResponse;
use OCP\Defaults;
use OCP\IRequest;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserSession;
use PHPUnit\Framework\TestCase;
Expand All @@ -47,9 +48,9 @@ protected function setUp(): void {

$this->request = $this->createMock(IRequest::class);
$this->userSession = $this->createMock(IUserSession::class);
$this->totp = $this->createMock(Totp::class);
$this->defaults = $this->createMock(Defaults::class);
$this->urlGenerator = $this->createMock(IURLGenerator::class);
$this->totp = $this->createMock(ITotp::class);
$this->defaults = $this->createMock(Defaults::class); // Optional, falls Defaults nicht mehr direkt gemockt werden muss
$this->urlGenerator = $this->createMock(IURLGenerator::class); // Stelle sicher, dass dies vorhanden ist

$this->controller = new SettingsController(
'twofactor_totp',
Expand Down

0 comments on commit d4ce413

Please sign in to comment.