diff options
author | Joas Schilling <coding@schilljs.com> | 2025-05-17 11:46:26 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2025-05-20 21:43:43 +0200 |
commit | 2e0eef00ab54a3c79d0b4898d4c6306c2ab01f5c (patch) | |
tree | 11842f78d02869bc68d38d183daeec52c82f5de3 /apps/files_external/tests/Controller/AjaxControllerTest.php | |
parent | 68b2a6261dadd9816ce3e74132cd9c66e021bd53 (diff) | |
download | nextcloud-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.php | 32 |
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); |