aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Encryption
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-04-05 17:42:14 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-04-05 17:42:14 +0200
commit8d5165e8dc40289b5d523523c4140f780b2fe293 (patch)
treeb4d15f2bc67e16c94d7cdfdb893a773b415d2738 /tests/lib/Encryption
parent426c0341ffff262f58d1b7f031de4f0c53c8bec5 (diff)
downloadnextcloud-server-8d5165e8dc40289b5d523523c4140f780b2fe293.tar.gz
nextcloud-server-8d5165e8dc40289b5d523523c4140f780b2fe293.zip
Adapt tests to config value typing
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests/lib/Encryption')
-rw-r--r--tests/lib/Encryption/Keys/StorageTest.php18
-rw-r--r--tests/lib/Encryption/ManagerTest.php10
2 files changed, 14 insertions, 14 deletions
diff --git a/tests/lib/Encryption/Keys/StorageTest.php b/tests/lib/Encryption/Keys/StorageTest.php
index d1c0257cc6e..a47edb3fdd6 100644
--- a/tests/lib/Encryption/Keys/StorageTest.php
+++ b/tests/lib/Encryption/Keys/StorageTest.php
@@ -77,7 +77,7 @@ class StorageTest extends TestCase {
}
public function testSetFileKey() {
- $this->config->method('getSystemValue')
+ $this->config->method('getSystemValueString')
->with('version')
->willReturn('20.0.0.2');
$this->util->expects($this->any())
@@ -103,7 +103,7 @@ class StorageTest extends TestCase {
}
public function testSetFileOld() {
- $this->config->method('getSystemValue')
+ $this->config->method('getSystemValueString')
->with('version')
->willReturn('20.0.0.0');
$this->util->expects($this->any())
@@ -145,7 +145,7 @@ class StorageTest extends TestCase {
* @param string $expectedKeyContent
*/
public function testGetFileKey($path, $strippedPartialName, $originalKeyExists, $expectedKeyContent) {
- $this->config->method('getSystemValue')
+ $this->config->method('getSystemValueString')
->with('version')
->willReturn('20.0.0.2');
$this->util->expects($this->any())
@@ -201,7 +201,7 @@ class StorageTest extends TestCase {
}
public function testSetFileKeySystemWide() {
- $this->config->method('getSystemValue')
+ $this->config->method('getSystemValueString')
->with('version')
->willReturn('20.0.0.2');
@@ -233,7 +233,7 @@ class StorageTest extends TestCase {
}
public function testGetFileKeySystemWide() {
- $this->config->method('getSystemValue')
+ $this->config->method('getSystemValueString')
->with('version')
->willReturn('20.0.0.2');
@@ -261,7 +261,7 @@ class StorageTest extends TestCase {
}
public function testSetSystemUserKey() {
- $this->config->method('getSystemValue')
+ $this->config->method('getSystemValueString')
->with('version')
->willReturn('20.0.0.2');
@@ -281,7 +281,7 @@ class StorageTest extends TestCase {
}
public function testSetUserKey() {
- $this->config->method('getSystemValue')
+ $this->config->method('getSystemValueString')
->with('version')
->willReturn('20.0.0.2');
@@ -301,7 +301,7 @@ class StorageTest extends TestCase {
}
public function testGetSystemUserKey() {
- $this->config->method('getSystemValue')
+ $this->config->method('getSystemValueString')
->with('version')
->willReturn('20.0.0.2');
@@ -324,7 +324,7 @@ class StorageTest extends TestCase {
}
public function testGetUserKey() {
- $this->config->method('getSystemValue')
+ $this->config->method('getSystemValueString')
->with('version')
->willReturn('20.0.0.2');
diff --git a/tests/lib/Encryption/ManagerTest.php b/tests/lib/Encryption/ManagerTest.php
index 79d2c216080..4e354ad518c 100644
--- a/tests/lib/Encryption/ManagerTest.php
+++ b/tests/lib/Encryption/ManagerTest.php
@@ -66,7 +66,7 @@ class ManagerTest extends TestCase {
}
public function testManagerIsEnabled() {
- $this->config->expects($this->any())->method('getSystemValue')->willReturn(true);
+ $this->config->expects($this->any())->method('getSystemValueBool')->willReturn(true);
$this->config->expects($this->any())->method('getAppValue')->willReturn('yes');
$this->assertTrue($this->manager->isEnabled());
}
@@ -199,7 +199,7 @@ class ManagerTest extends TestCase {
// */
// public function testModuleRegistration() {
// $config = $this->createMock(IConfig::class);
-// $config->expects($this->any())->method('getSystemValue')->willReturn(true);
+// $config->expects($this->any())->method('getSystemValueBool')->willReturn(true);
// $em = $this->createMock(IEncryptionModule::class);
// $em->expects($this->any())->method('getId')->willReturn(0);
// $em->expects($this->any())->method('getDisplayName')->willReturn('TestDummyModule0');
@@ -211,7 +211,7 @@ class ManagerTest extends TestCase {
//
// public function testModuleUnRegistration() {
// $config = $this->createMock(IConfig::class);
-// $config->expects($this->any())->method('getSystemValue')->willReturn(true);
+// $config->expects($this->any())->method('getSystemValueBool')->willReturn(true);
// $em = $this->createMock(IEncryptionModule::class);
// $em->expects($this->any())->method('getId')->willReturn(0);
// $em->expects($this->any())->method('getDisplayName')->willReturn('TestDummyModule0');
@@ -228,7 +228,7 @@ class ManagerTest extends TestCase {
// */
// public function testGetEncryptionModuleUnknown() {
// $config = $this->createMock(IConfig::class);
-// $config->expects($this->any())->method('getSystemValue')->willReturn(true);
+// $config->expects($this->any())->method('getSystemValueBool')->willReturn(true);
// $em = $this->createMock(IEncryptionModule::class);
// $em->expects($this->any())->method('getId')->willReturn(0);
// $em->expects($this->any())->method('getDisplayName')->willReturn('TestDummyModule0');
@@ -240,7 +240,7 @@ class ManagerTest extends TestCase {
//
// public function testGetEncryptionModule() {
// $config = $this->createMock(IConfig::class);
-// $config->expects($this->any())->method('getSystemValue')->willReturn(true);
+// $config->expects($this->any())->method('getSystemValueBool')->willReturn(true);
// $em = $this->createMock(IEncryptionModule::class);
// $em->expects($this->any())->method('getId')->willReturn(0);
// $em->expects($this->any())->method('getDisplayName')->willReturn('TestDummyModule0');