aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2024-01-31 10:06:52 -0100
committerMaxence Lange <maxence@artificial-owl.com>2024-03-11 10:59:43 -0100
commit0a79884abfb37983fe2d9874d46b6a6aab6f3a16 (patch)
tree3a9b30066873e1b548e74e3b912a99fc9993a080 /tests
parent9b6424e5cacc5cdeccf24c4a65a1140916c55a01 (diff)
downloadnextcloud-server-0a79884abfb37983fe2d9874d46b6a6aab6f3a16.tar.gz
nextcloud-server-0a79884abfb37983fe2d9874d46b6a6aab6f3a16.zip
feat(appconfig): switching integrity check to lazy config values
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/IntegrityCheck/CheckerTest.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/lib/IntegrityCheck/CheckerTest.php b/tests/lib/IntegrityCheck/CheckerTest.php
index 203e7e97227..1cfbe9907a9 100644
--- a/tests/lib/IntegrityCheck/CheckerTest.php
+++ b/tests/lib/IntegrityCheck/CheckerTest.php
@@ -28,6 +28,7 @@ use OC\IntegrityCheck\Helpers\EnvironmentHelper;
use OC\IntegrityCheck\Helpers\FileAccessHelper;
use OC\Memcache\NullCache;
use OCP\App\IAppManager;
+use OCP\IAppConfig;
use OCP\ICacheFactory;
use OCP\IConfig;
use phpseclib\Crypt\RSA;
@@ -45,6 +46,8 @@ class CheckerTest extends TestCase {
private $fileAccessHelper;
/** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
+ /** @var IAppConfig|\PHPUnit\Framework\MockObject\MockObject */
+ private $appConfig;
/** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */
private $cacheFactory;
/** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
@@ -58,6 +61,7 @@ class CheckerTest extends TestCase {
$this->fileAccessHelper = $this->createMock(FileAccessHelper::class);
$this->appLocator = $this->createMock(AppLocator::class);
$this->config = $this->createMock(IConfig::class);
+ $this->appConfig = $this->createMock(IAppConfig::class);
$this->cacheFactory = $this->createMock(ICacheFactory::class);
$this->appManager = $this->createMock(IAppManager::class);
$this->mimeTypeDetector = $this->createMock(\OC\Files\Type\Detection::class);
@@ -76,6 +80,7 @@ class CheckerTest extends TestCase {
$this->fileAccessHelper,
$this->appLocator,
$this->config,
+ $this->appConfig,
$this->cacheFactory,
$this->appManager,
$this->mimeTypeDetector
@@ -1025,6 +1030,7 @@ class CheckerTest extends TestCase {
$this->fileAccessHelper,
$this->appLocator,
$this->config,
+ $this->appConfig,
$this->cacheFactory,
$this->appManager,
$this->mimeTypeDetector,
@@ -1089,9 +1095,9 @@ class CheckerTest extends TestCase {
true,
false,
);
- $this->config
+ $this->appConfig
->expects($this->once())
- ->method('deleteAppValue')
+ ->method('deleteKey')
->with('core', 'oc.integritycheck.checker');
$this->checker->runInstanceVerification();