aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests/Controller/AjaxControllerTest.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2025-05-17 11:46:26 +0200
committerJoas Schilling <coding@schilljs.com>2025-05-17 16:34:05 +0200
commita8b1dad8ca4ffbddf7967ceff6b3eb31eab18914 (patch)
tree97c2316e9db43ab0ab45c6c8eaaa7e06e0042b30 /apps/files_external/tests/Controller/AjaxControllerTest.php
parent0c2934e885f77284b2923dcf6a43d0f39727c2c3 (diff)
downloadnextcloud-server-tests/noid/migrate-files-external-to-phpunit10.tar.gz
nextcloud-server-tests/noid/migrate-files-external-to-phpunit10.zip
test: Prepare files_external for PHPUnit10tests/noid/migrate-files-external-to-phpunit10
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files_external/tests/Controller/AjaxControllerTest.php')
-rw-r--r--apps/files_external/tests/Controller/AjaxControllerTest.php32
1 files changed, 12 insertions, 20 deletions
diff --git a/apps/files_external/tests/Controller/AjaxControllerTest.php b/apps/files_external/tests/Controller/AjaxControllerTest.php
index 005e6e9714c..b1ea7a2b1b1 100644
--- a/apps/files_external/tests/Controller/AjaxControllerTest.php
+++ b/apps/files_external/tests/Controller/AjaxControllerTest.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
@@ -14,32 +16,22 @@ use OCP\IL10N;
use OCP\IRequest;
use OCP\IUser;
use OCP\IUserSession;
+use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
class AjaxControllerTest extends TestCase {
- /** @var IRequest */
- private $request;
- /** @var RSA */
- private $rsa;
- /** @var GlobalAuth */
- private $globalAuth;
- /** @var IUserSession */
- private $userSession;
- /** @var IGroupManager */
- private $groupManager;
- /** @var AjaxController */
- private $ajaxController;
- /** @var IL10N */
- private $l10n;
+ private IRequest&MockObject $request;
+ private RSA&MockObject $rsa;
+ private GlobalAuth&MockObject $globalAuth;
+ private IUserSession&MockObject $userSession;
+ private IGroupManager&MockObject $groupManager;
+ private IL10N&MockObject $l10n;
+ private AjaxController $ajaxController;
protected function setUp(): void {
$this->request = $this->createMock(IRequest::class);
- $this->rsa = $this->getMockBuilder('\\OCA\\Files_External\\Lib\\Auth\\PublicKey\\RSA')
- ->disableOriginalConstructor()
- ->getMock();
- $this->globalAuth = $this->getMockBuilder('\\OCA\\Files_External\\Lib\\Auth\\Password\GlobalAuth')
- ->disableOriginalConstructor()
- ->getMock();
+ $this->rsa = $this->createMock(RSA::class);
+ $this->globalAuth = $this->createMock(GlobalAuth::class);
$this->userSession = $this->createMock(IUserSession::class);
$this->groupManager = $this->createMock(IGroupManager::class);
$this->l10n = $this->createMock(IL10N::class);