diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-03-16 15:17:55 +0100 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-03-16 15:34:14 +0100 |
commit | 1d8bf9a89c6856218802a1d365000a5831be8655 (patch) | |
tree | e7c2dd21aaf761f6f0b664e67ff7251cbdfd44e8 /apps/federatedfilesharing/tests/Controller | |
parent | d59179ae1960be1a449771eb3f0b1689fc2ff5e2 (diff) | |
download | nextcloud-server-1d8bf9a89c6856218802a1d365000a5831be8655.tar.gz nextcloud-server-1d8bf9a89c6856218802a1d365000a5831be8655.zip |
Log in audit log federated shares events
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/federatedfilesharing/tests/Controller')
-rw-r--r-- | apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php | 10 |
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 ); } |