diff options
Diffstat (limited to 'apps/federatedfilesharing/tests/Controller')
-rw-r--r-- | apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php | 7 | ||||
-rw-r--r-- | apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php | 8 |
2 files changed, 8 insertions, 7 deletions
diff --git a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php index 7714ff4731c..b5ea08af8d5 100644 --- a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php +++ b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php @@ -35,6 +35,7 @@ use OCP\Federation\ICloudIdManager; use OCP\Files\IRootFolder; use OCP\Http\Client\IClientService; use OCP\IL10N; +use OCP\IRequest; use OCP\ISession; use OCP\IUserManager; use OCP\IUserSession; @@ -85,17 +86,17 @@ class MountPublicLinkControllerTest extends \Test\TestCase { public function setUp() { parent::setUp(); - $this->request = $this->getMockBuilder('OCP\IRequest')->disableOriginalConstructor()->getMock(); + $this->request = $this->getMockBuilder(IRequest::class)->disableOriginalConstructor()->getMock(); $this->federatedShareProvider = $this->getMockBuilder('OCA\FederatedFileSharing\FederatedShareProvider') ->disableOriginalConstructor()->getMock(); $this->shareManager = $this->getMockBuilder('OCP\Share\IManager')->disableOriginalConstructor()->getMock(); $this->addressHandler = $this->getMockBuilder('OCA\FederatedFileSharing\AddressHandler') ->disableOriginalConstructor()->getMock(); $this->rootFolder = $this->getMockBuilder('OCP\Files\IRootFolder')->disableOriginalConstructor()->getMock(); - $this->userManager = $this->getMockBuilder('OCP\IUserManager')->disableOriginalConstructor()->getMock(); + $this->userManager = $this->getMockBuilder(IUserManager::class)->disableOriginalConstructor()->getMock(); $this->share = new \OC\Share20\Share($this->rootFolder, $this->userManager); $this->session = $this->getMockBuilder('OCP\ISession')->disableOriginalConstructor()->getMock(); - $this->l10n = $this->getMockBuilder('OCP\IL10N')->disableOriginalConstructor()->getMock(); + $this->l10n = $this->getMockBuilder(IL10N::class)->disableOriginalConstructor()->getMock(); $this->userSession = $this->getMockBuilder('OCP\IUserSession')->disableOriginalConstructor()->getMock(); $this->clientService = $this->getMockBuilder('OCP\Http\Client\IClientService')->disableOriginalConstructor()->getMock(); $this->cloudIdManager = new CloudIdManager(); diff --git a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php index d57b2cb207f..538c6ae5a08 100644 --- a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php +++ b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php @@ -29,13 +29,13 @@ namespace OCA\FederatedFileSharing\Tests; use OC\Federation\CloudIdManager; use OC\Files\Filesystem; -use OCA\FederatedFileSharing\DiscoveryManager; use OCA\FederatedFileSharing\FederatedShareProvider; use OCA\FederatedFileSharing\Controller\RequestHandlerController; use OCP\Federation\ICloudIdManager; use OCP\Http\Client\IClient; use OCP\Http\Client\IClientService; use OCP\Http\Client\IResponse; +use OCP\IConfig; use OCP\IUserManager; use OCP\Share\IShare; @@ -83,9 +83,9 @@ class RequestHandlerControllerTest extends TestCase { self::loginHelper(self::TEST_FILES_SHARING_API_USER1); \OC\Share\Share::registerBackend('test', 'Test\Share\Backend'); - $config = $this->getMockBuilder('\OCP\IConfig') + $config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor()->getMock(); - $clientService = $this->getMockBuilder('\OCP\Http\Client\IClientService')->getMock(); + $clientService = $this->getMockBuilder(IClientService::class)->getMock(); $httpHelperMock = $this->getMockBuilder('\OC\HTTPHelper') ->setConstructorArgs([$config, $clientService]) ->getMock(); @@ -104,7 +104,7 @@ class RequestHandlerControllerTest extends TestCase { ->disableOriginalConstructor()->getMock(); $this->addressHandler = $this->getMockBuilder('OCA\FederatedFileSharing\AddressHandler') ->disableOriginalConstructor()->getMock(); - $this->userManager = $this->getMockBuilder('OCP\IUserManager')->getMock(); + $this->userManager = $this->getMockBuilder(IUserManager::class)->getMock(); $this->cloudIdManager = new CloudIdManager(); |