Move app loading in encryption trait below config value changes

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2020-11-22 23:21:16 +01:00
parent d8d53d39a4
commit 3a16762df6
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 5 additions and 4 deletions

View File

@ -87,15 +87,16 @@ trait EncryptionTrait {
$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());
}