aboutsummaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/tests/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'apps/federatedfilesharing/tests/Controller')
-rw-r--r--apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
index 0cb91fac1ae..77f7fde70fa 100644
--- a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
+++ b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
@@ -34,6 +34,7 @@ use OCP\Federation\ICloudFederationProvider;
use OCP\Federation\ICloudFederationProviderManager;
use OCP\Federation\ICloudFederationShare;
use OCP\Federation\ICloudIdManager;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\IDBConnection;
use OCP\IRequest;
use OCP\IUserManager;
@@ -100,6 +101,9 @@ class RequestHandlerControllerTest extends \Test\TestCase {
/** @var ICloudFederationShare|\PHPUnit\Framework\MockObject\MockObject */
private $cloudFederationShare;
+ /** @var IEventDispatcher|\PHPUnit\Framework\MockObject\MockObject */
+ private $eventDispatcher;
+
protected function setUp(): void {
$this->share = $this->getMockBuilder(IShare::class)->getMock();
$this->federatedShareProvider = $this->getMockBuilder('OCA\FederatedFileSharing\FederatedShareProvider')
@@ -124,7 +128,8 @@ class RequestHandlerControllerTest extends \Test\TestCase {
$this->cloudFederationProviderManager = $this->createMock(ICloudFederationProviderManager::class);
$this->cloudFederationProvider = $this->createMock(ICloudFederationProvider::class);
$this->cloudFederationShare = $this->createMock(ICloudFederationShare::class);
-
+ $this->eventDispatcher = $this->createMock(IEventDispatcher::class);
+ $this->eventDispatcher->expects($this->any())->method('dispatchTyped');
$this->logger = $this->createMock(LoggerInterface::class);
@@ -140,7 +145,8 @@ class RequestHandlerControllerTest extends \Test\TestCase {
$this->cloudIdManager,
$this->logger,
$this->cloudFederationFactory,
- $this->cloudFederationProviderManager
+ $this->cloudFederationProviderManager,
+ $this->eventDispatcher
);
}