aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption/tests/Controller/StatusControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/encryption/tests/Controller/StatusControllerTest.php')
-rw-r--r--apps/encryption/tests/Controller/StatusControllerTest.php23
1 files changed, 9 insertions, 14 deletions
diff --git a/apps/encryption/tests/Controller/StatusControllerTest.php b/apps/encryption/tests/Controller/StatusControllerTest.php
index fbe44f52fb7..616114927e8 100644
--- a/apps/encryption/tests/Controller/StatusControllerTest.php
+++ b/apps/encryption/tests/Controller/StatusControllerTest.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -12,24 +14,17 @@ use OCA\Encryption\Session;
use OCP\Encryption\IManager;
use OCP\IL10N;
use OCP\IRequest;
+use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
class StatusControllerTest extends TestCase {
- /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
- private $requestMock;
-
- /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
- private $l10nMock;
-
- /** @var Session|\PHPUnit\Framework\MockObject\MockObject */
- protected $sessionMock;
-
- /** @var IManager | \PHPUnit\Framework\MockObject\MockObject */
- protected $encryptionManagerMock;
+ protected IRequest&MockObject $requestMock;
+ protected IL10N&MockObject $l10nMock;
+ protected Session&MockObject $sessionMock;
+ protected IManager&MockObject $encryptionManagerMock;
- /** @var StatusController */
- protected $controller;
+ protected StatusController $controller;
protected function setUp(): void {
parent::setUp();
@@ -68,7 +63,7 @@ class StatusControllerTest extends TestCase {
$this->assertSame($expectedStatus, $data['status']);
}
- public function dataTestGetStatus() {
+ public static function dataTestGetStatus(): array {
return [
[Session::INIT_EXECUTED, 'interactionNeeded'],
[Session::INIT_SUCCESSFUL, 'success'],