Skip to content

Commit bf8dd6f

Browse files
committed
test: add missing IEventDispatcher parameter to RequestSignatureServiceTest
The RequestSignatureService constructor was updated to require 18 parameters including IEventDispatcher, but the test was only passing 17 parameters. This commit adds the missing mock dependency to fix all failing tests. Signed-off-by: Vitor Mattos <[email protected]>
1 parent 9349178 commit bf8dd6f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/php/Unit/Service/RequestSignatureServiceTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
use OCP\IL10N;
2828
use OCP\IUser;
2929
use OCP\IUserManager;
30+
use OCP\EventDispatcher\IEventDispatcher;
3031
use PHPUnit\Framework\MockObject\MockObject;
3132
use Psr\Log\LoggerInterface;
3233

@@ -50,6 +51,7 @@ final class RequestSignatureServiceTest extends \OCA\Libresign\Tests\Unit\TestCa
5051
private LoggerInterface&MockObject $loggerInterface;
5152
private SequentialSigningService&MockObject $sequentialSigningService;
5253
private IAppConfig&MockObject $appConfig;
54+
private IEventDispatcher&MockObject $eventDispatcher;
5355

5456
public function setUp(): void {
5557
parent::setUp();
@@ -76,6 +78,7 @@ public function setUp(): void {
7678
$this->loggerInterface = $this->createMock(LoggerInterface::class);
7779
$this->sequentialSigningService = $this->createMock(SequentialSigningService::class);
7880
$this->appConfig = $this->createMock(IAppConfig::class);
81+
$this->eventDispatcher = $this->createMock(IEventDispatcher::class);
7982
}
8083

8184
private function getService(?SequentialSigningService $sequentialSigningService = null): RequestSignatureService {
@@ -97,6 +100,7 @@ private function getService(?SequentialSigningService $sequentialSigningService
97100
$this->loggerInterface,
98101
$sequentialSigningService ?? $this->sequentialSigningService,
99102
$this->appConfig,
103+
$this->eventDispatcher,
100104
);
101105
}
102106

0 commit comments

Comments
 (0)