From d4f6ff8123e0eea1dc6c01f45538890dd672c812 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Mon, 6 Dec 2021 16:53:15 -0300 Subject: Reduce DeprecatedMethod Signed-off-by: Vitor Mattos --- tests/php/Federation/FederationTest.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/php/Federation/FederationTest.php') 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()) -- cgit v1.2.3