summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/tests/NotificationsTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/federatedfilesharing/tests/NotificationsTest.php')
-rw-r--r--apps/federatedfilesharing/tests/NotificationsTest.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/apps/federatedfilesharing/tests/NotificationsTest.php b/apps/federatedfilesharing/tests/NotificationsTest.php
index a5f5c6bc078..4f70d5f3950 100644
--- a/apps/federatedfilesharing/tests/NotificationsTest.php
+++ b/apps/federatedfilesharing/tests/NotificationsTest.php
@@ -25,10 +25,10 @@ namespace OCA\FederatedFileSharing\Tests;
use OCA\FederatedFileSharing\AddressHandler;
-use OCA\FederatedFileSharing\DiscoveryManager;
use OCA\FederatedFileSharing\Notifications;
use OCP\BackgroundJob\IJobList;
use OCP\Http\Client\IClientService;
+use OCP\OCS\IDiscoveryService;
class NotificationsTest extends \Test\TestCase {
@@ -38,8 +38,8 @@ class NotificationsTest extends \Test\TestCase {
/** @var IClientService | \PHPUnit_Framework_MockObject_MockObject*/
private $httpClientService;
- /** @var DiscoveryManager | \PHPUnit_Framework_MockObject_MockObject */
- private $discoveryManager;
+ /** @var IDiscoveryService | \PHPUnit_Framework_MockObject_MockObject */
+ private $discoveryService;
/** @var IJobList | \PHPUnit_Framework_MockObject_MockObject */
private $jobList;
@@ -48,8 +48,7 @@ class NotificationsTest extends \Test\TestCase {
parent::setUp();
$this->jobList = $this->getMockBuilder('OCP\BackgroundJob\IJobList')->getMock();
- $this->discoveryManager = $this->getMockBuilder('OCA\FederatedFileSharing\DiscoveryManager')
- ->disableOriginalConstructor()->getMock();
+ $this->discoveryService = $this->getMockBuilder(IDiscoveryService::class)->getMock();
$this->httpClientService = $this->getMockBuilder('OCP\Http\Client\IClientService')->getMock();
$this->addressHandler = $this->getMockBuilder('OCA\FederatedFileSharing\AddressHandler')
->disableOriginalConstructor()->getMock();
@@ -67,7 +66,7 @@ class NotificationsTest extends \Test\TestCase {
$instance = new Notifications(
$this->addressHandler,
$this->httpClientService,
- $this->discoveryManager,
+ $this->discoveryService,
$this->jobList
);
} else {
@@ -76,7 +75,7 @@ class NotificationsTest extends \Test\TestCase {
[
$this->addressHandler,
$this->httpClientService,
- $this->discoveryManager,
+ $this->discoveryService,
$this->jobList
]
)->setMethods($mockedMethods)->getMock();