test(files_sharing): update ShareesAPIController mock to include FederatedShareProvider dependency

Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
pull/58126/head
Cristian Scheid 3 days ago committed by Andy Scherzinger
parent e249b7e4e1
commit f0517dbdd9
  1. 14
      apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php

@ -7,6 +7,7 @@
*/
namespace OCA\Files_Sharing\Tests\Controller;
use OCA\FederatedFileSharing\FederatedShareProvider;
use OCA\Files_Sharing\Controller\ShareesAPIController;
use OCA\Files_Sharing\Tests\TestCase;
use OCP\AppFramework\Http\DataResponse;
@ -46,6 +47,9 @@ class ShareesAPIControllerTest extends TestCase {
/** @var IConfig|MockObject */
protected $config;
/** @var FederatedShareProvider|MockObject */
protected $federatedShareProvider;
protected function setUp(): void {
parent::setUp();
@ -58,6 +62,7 @@ class ShareesAPIControllerTest extends TestCase {
$urlGeneratorMock = $this->createMock(IURLGenerator::class);
$this->collaboratorSearch = $this->createMock(ISearch::class);
$this->federatedShareProvider = $this->createMock(FederatedShareProvider::class);
$this->sharees = new ShareesAPIController(
'files_sharing',
@ -66,7 +71,8 @@ class ShareesAPIControllerTest extends TestCase {
$this->config,
$urlGeneratorMock,
$this->shareManager,
$this->collaboratorSearch
$this->collaboratorSearch,
$this->federatedShareProvider
);
}
@ -260,7 +266,8 @@ class ShareesAPIControllerTest extends TestCase {
$config,
$urlGenerator,
$this->shareManager,
$this->collaboratorSearch
$this->collaboratorSearch,
$this->federatedShareProvider
])
->onlyMethods(['isRemoteSharingAllowed', 'isRemoteGroupSharingAllowed'])
->getMock();
@ -359,7 +366,8 @@ class ShareesAPIControllerTest extends TestCase {
$config,
$urlGenerator,
$this->shareManager,
$this->collaboratorSearch
$this->collaboratorSearch,
$this->federatedShareProvider
])
->onlyMethods(['isRemoteSharingAllowed'])
->getMock();

Loading…
Cancel
Save