diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-07-13 15:43:42 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-07-23 08:33:17 +0200 |
commit | 0763a173321488acaadceb1eb0ecf1ec8691bf21 (patch) | |
tree | e3a722bae6695c6ce2e0feaf06298effcf92d773 /apps/federatedfilesharing/tests | |
parent | 99d0ba5f7ea45bb636cfcfc2de144e25af88b916 (diff) | |
download | nextcloud-server-0763a173321488acaadceb1eb0ecf1ec8691bf21.tar.gz nextcloud-server-0763a173321488acaadceb1eb0ecf1ec8691bf21.zip |
Move federated_share_added into a typed event
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
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(); } |