From 1d8bf9a89c6856218802a1d365000a5831be8655 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Wed, 16 Mar 2022 15:17:55 +0100 Subject: Log in audit log federated shares events Signed-off-by: Carl Schwan --- .../tests/Controller/RequestHandlerControllerTest.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'apps/federatedfilesharing/tests/Controller') 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 ); } -- cgit v1.2.3