From 0763a173321488acaadceb1eb0ecf1ec8691bf21 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Mon, 13 Jul 2020 15:43:42 +0200 Subject: Move federated_share_added into a typed event Signed-off-by: Morris Jobke --- apps/federatedfilesharing/tests/NotificationsTest.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'apps/federatedfilesharing/tests') diff --git a/apps/federatedfilesharing/tests/NotificationsTest.php b/apps/federatedfilesharing/tests/NotificationsTest.php index af48b594380..32ceedd45c0 100644 --- a/apps/federatedfilesharing/tests/NotificationsTest.php +++ b/apps/federatedfilesharing/tests/NotificationsTest.php @@ -27,6 +27,7 @@ namespace OCA\FederatedFileSharing\Tests; use OCA\FederatedFileSharing\AddressHandler; use OCA\FederatedFileSharing\Notifications; use OCP\BackgroundJob\IJobList; +use OCP\EventDispatcher\IEventDispatcher; use OCP\Federation\ICloudFederationFactory; use OCP\Federation\ICloudFederationProviderManager; use OCP\Http\Client\IClientService; @@ -52,6 +53,9 @@ class NotificationsTest extends \Test\TestCase { /** @var ICloudFederationFactory|\PHPUnit_Framework_MockObject_MockObject */ private $cloudFederationFactory; + /** @var IEventDispatcher|\PHPUnit_Framework_MockObject_MockObject */ + private $eventDispatcher; + protected function setUp(): void { parent::setUp(); @@ -62,6 +66,7 @@ class NotificationsTest extends \Test\TestCase { ->disableOriginalConstructor()->getMock(); $this->cloudFederationProviderManager = $this->createMock(ICloudFederationProviderManager::class); $this->cloudFederationFactory = $this->createMock(ICloudFederationFactory::class); + $this->eventDispatcher = $this->createMock(IEventDispatcher::class); } /** @@ -78,7 +83,8 @@ class NotificationsTest extends \Test\TestCase { $this->discoveryService, $this->jobList, $this->cloudFederationProviderManager, - $this->cloudFederationFactory + $this->cloudFederationFactory, + $this->eventDispatcher ); } else { $instance = $this->getMockBuilder('OCA\FederatedFileSharing\Notifications') @@ -89,7 +95,8 @@ class NotificationsTest extends \Test\TestCase { $this->discoveryService, $this->jobList, $this->cloudFederationProviderManager, - $this->cloudFederationFactory + $this->cloudFederationFactory, + $this->eventDispatcher ] )->setMethods($mockedMethods)->getMock(); } -- cgit v1.2.3