aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Core/Command/Encryption/DecryptAllTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Core/Command/Encryption/DecryptAllTest.php')
-rw-r--r--tests/Core/Command/Encryption/DecryptAllTest.php17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/Core/Command/Encryption/DecryptAllTest.php b/tests/Core/Command/Encryption/DecryptAllTest.php
index 45b331efb59..41d9e4c713f 100644
--- a/tests/Core/Command/Encryption/DecryptAllTest.php
+++ b/tests/Core/Command/Encryption/DecryptAllTest.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -17,13 +18,13 @@ use Symfony\Component\Console\Output\OutputInterface;
use Test\TestCase;
class DecryptAllTest extends TestCase {
- /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IConfig */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IConfig */
protected $config;
/** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\Encryption\IManager */
protected $encryptionManager;
- /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\App\IAppManager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IAppManager */
protected $appManager;
/** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Input\InputInterface */
@@ -79,7 +80,7 @@ class DecryptAllTest extends TestCase {
];
$this->config->expects($this->exactly(2))
->method('setSystemValue')
- ->willReturnCallback(function () use (&$calls) {
+ ->willReturnCallback(function () use (&$calls): void {
$expected = array_shift($calls);
$this->assertEquals($expected, func_get_args());
});
@@ -109,9 +110,7 @@ class DecryptAllTest extends TestCase {
$this->invokePrivate($instance, 'resetMaintenanceAndTrashbin');
}
- /**
- * @dataProvider dataTestExecute
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestExecute')]
public function testExecute($encryptionEnabled, $continue): void {
$instance = new DecryptAll(
$this->encryptionManager,
@@ -137,7 +136,7 @@ class DecryptAllTest extends TestCase {
];
$this->config->expects($this->exactly(2))
->method('setAppValue')
- ->willReturnCallback(function () use (&$calls) {
+ ->willReturnCallback(function () use (&$calls): void {
$expected = array_shift($calls);
$this->assertEquals($expected, func_get_args());
});
@@ -188,7 +187,7 @@ class DecryptAllTest extends TestCase {
];
$this->config->expects($this->exactly(2))
->method('setAppValue')
- ->willReturnCallback(function () use (&$calls) {
+ ->willReturnCallback(function () use (&$calls): void {
$expected = array_shift($calls);
$this->assertEquals($expected, func_get_args());
});
@@ -208,7 +207,7 @@ class DecryptAllTest extends TestCase {
$this->decryptAll->expects($this->once())
->method('decryptAll')
->with($this->consoleInput, $this->consoleOutput, 'user1')
- ->willReturnCallback(function () {
+ ->willReturnCallback(function (): void {
throw new \Exception();
});