summaryrefslogtreecommitdiffstats
path: root/tests/php/Federation/FederationTest.php
diff options
context:
space:
mode:
authorVitor Mattos <vitor@php.rio>2021-12-06 16:53:15 -0300
committerVitor Mattos <vitor@php.rio>2021-12-06 16:53:15 -0300
commitd4f6ff8123e0eea1dc6c01f45538890dd672c812 (patch)
treefa0cf62d5efb2d8ea0f5b93df3726c6fd32d3e82 /tests/php/Federation/FederationTest.php
parent7b36db07a31bbf6821551f95dff317923c9e0770 (diff)
Reduce DeprecatedMethod
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'tests/php/Federation/FederationTest.php')
-rw-r--r--tests/php/Federation/FederationTest.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/php/Federation/FederationTest.php b/tests/php/Federation/FederationTest.php
index 8c107cc34..401562fe4 100644
--- a/tests/php/Federation/FederationTest.php
+++ b/tests/php/Federation/FederationTest.php
@@ -24,6 +24,7 @@ namespace OCA\Talk\Tests\php\Federation;
use OC\Federation\CloudFederationShare;
use OCA\FederatedFileSharing\AddressHandler;
+use OCA\Talk\Config;
use OCA\Talk\Federation\CloudFederationProviderTalk;
use OCA\Talk\Federation\FederationManager;
use OCA\Talk\Federation\Notifications;
@@ -58,6 +59,9 @@ class FederationTest extends TestCase {
/** @var ICloudFederationFactory */
protected $cloudFederationFactory;
+ /** @var Config */
+ protected $config;
+
/** @var AddressHandler */
protected $addressHandler;
@@ -81,6 +85,7 @@ class FederationTest extends TestCase {
$this->addressHandler = $this->createMock(AddressHandler::class);
$this->userManager = $this->createMock(IUserManager::class);
$this->attendeeMapper = $this->createMock(AttendeeMapper::class);
+ $this->config = $this->createMock(Config::class);
$this->notifications = new Notifications(
$this->cloudFederationFactory,
@@ -98,6 +103,7 @@ class FederationTest extends TestCase {
$this->userManager,
$this->addressHandler,
$this->federationManager,
+ $this->config,
$this->notificationManager,
$this->createMock(IURLGenerator::class),
$this->createMock(ParticipantService::class),
@@ -230,7 +236,7 @@ class FederationTest extends TestCase {
->with($shareWithUser, $providerId, $roomType, $roomName, $name, $remote, $token)
->willReturn(20);
- $this->federationManager->method('isEnabled')
+ $this->config->method('isFederationEnabled')
->willReturn(true);
$this->addressHandler->expects($this->once())