From 1e89772a331a710cc3b0ed23bef3407cd3429b53 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Sun, 22 Nov 2020 23:21:16 +0100 Subject: [PATCH] Move app loading in encryption trait below config value changes Signed-off-by: Morris Jobke --- tests/lib/Traits/EncryptionTrait.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/lib/Traits/EncryptionTrait.php b/tests/lib/Traits/EncryptionTrait.php index 12a8ad8109e53..cb98135727451 100644 --- a/tests/lib/Traits/EncryptionTrait.php +++ b/tests/lib/Traits/EncryptionTrait.php @@ -87,15 +87,16 @@ protected function setUpEncryptionTrait() { $this->markTestSkipped('Encryption not ready'); } - \OC_App::loadApp('encryption'); - - $this->encryptionApp = new Application([], $isReady); - $this->config = \OC::$server->getConfig(); $this->encryptionWasEnabled = $this->config->getAppValue('core', 'encryption_enabled', 'no'); $this->originalEncryptionModule = $this->config->getAppValue('core', 'default_encryption_module'); $this->config->setAppValue('core', 'default_encryption_module', \OCA\Encryption\Crypto\Encryption::ID); $this->config->setAppValue('core', 'encryption_enabled', 'yes'); + + \OC_App::loadApp('encryption'); + + $this->encryptionApp = new Application(); + $this->assertTrue(\OC::$server->getEncryptionManager()->isEnabled()); }