diff options
Diffstat (limited to 'tests/Core/Command/Encryption')
-rw-r--r-- | tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php | 3 | ||||
-rw-r--r-- | tests/Core/Command/Encryption/DecryptAllTest.php | 8 | ||||
-rw-r--r-- | tests/Core/Command/Encryption/SetDefaultModuleTest.php | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php index 8232db70504..a2d1434e905 100644 --- a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php +++ b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php @@ -8,6 +8,7 @@ namespace Tests\Core\Command\Encryption; use OC\Core\Command\Encryption\ChangeKeyStorageRoot; +use OC\Encryption\Keys\Storage; use OC\Encryption\Util; use OC\Files\View; use OCP\IConfig; @@ -157,7 +158,7 @@ class ChangeKeyStorageRootTest extends TestCase { ->willReturn(true); $this->view->expects($this->once())->method('file_put_contents') - ->with('newRoot/' . \OC\Encryption\Keys\Storage::KEY_STORAGE_MARKER, + ->with('newRoot/' . Storage::KEY_STORAGE_MARKER, 'Nextcloud will detect this folder as key storage root only if this file exists')->willReturn(true); $this->invokePrivate($this->changeKeyStorageRoot, 'prepareNewRoot', ['newRoot']); diff --git a/tests/Core/Command/Encryption/DecryptAllTest.php b/tests/Core/Command/Encryption/DecryptAllTest.php index 45b331efb59..ea22c101845 100644 --- a/tests/Core/Command/Encryption/DecryptAllTest.php +++ b/tests/Core/Command/Encryption/DecryptAllTest.php @@ -79,7 +79,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()); }); @@ -137,7 +137,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 +188,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 +208,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(); }); diff --git a/tests/Core/Command/Encryption/SetDefaultModuleTest.php b/tests/Core/Command/Encryption/SetDefaultModuleTest.php index 52f14dd4537..4ba7b7e8c97 100644 --- a/tests/Core/Command/Encryption/SetDefaultModuleTest.php +++ b/tests/Core/Command/Encryption/SetDefaultModuleTest.php @@ -119,7 +119,7 @@ class SetDefaultModuleTest extends TestCase { ]; $this->consoleOutput->expects($this->exactly(2)) ->method('writeln') - ->willReturnCallback(function ($message) use (&$calls) { + ->willReturnCallback(function ($message) use (&$calls): void { $expected = array_shift($calls); $this->assertStringContainsString($expected, $message); }); |