diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-07-23 21:42:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-23 21:42:48 +0200 |
commit | ce314d948464321bb2fced0941a6345267a40f35 (patch) | |
tree | f94f6e801708ccc877dd7822f1adf68abb14225d /apps/federatedfilesharing/tests | |
parent | a169bd243ff4b014fa4238845dbebbbc2a4d1021 (diff) | |
parent | 0763a173321488acaadceb1eb0ecf1ec8691bf21 (diff) | |
download | nextcloud-server-ce314d948464321bb2fced0941a6345267a40f35.tar.gz nextcloud-server-ce314d948464321bb2fced0941a6345267a40f35.zip |
Merge pull request #21814 from nextcloud/techdebt/noid/federated_share_added-into-typed-event
Move federated_share_added into a typed event
Diffstat (limited to 'apps/federatedfilesharing/tests')
-rw-r--r-- | apps/federatedfilesharing/tests/NotificationsTest.php | 11 |
1 files changed, 9 insertions, 2 deletions
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(); } |