mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(tests): Unregister encryption modules in ViewTest to avoid side effects
It was clearing the hooks with the same results before Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
536ccf144c
commit
38f341c179
1 changed files with 6 additions and 0 deletions
|
|
@ -111,6 +111,12 @@ class ViewTest extends \Test\TestCase {
|
|||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
\OC_Hook::clear();
|
||||
/* Disable encryption, this is not what we want to test */
|
||||
$encryptionManager = Server::get(\OCP\Encryption\IManager::class);
|
||||
$encryptionModules = $encryptionManager->getEncryptionModules();
|
||||
foreach (array_keys($encryptionModules) as $encryptionModuleId) {
|
||||
$encryptionManager->unregisterEncryptionModule($encryptionModuleId);
|
||||
}
|
||||
|
||||
Server::get(IUserManager::class)->clearBackends();
|
||||
Server::get(IUserManager::class)->registerBackend(new \Test\Util\User\Dummy());
|
||||
|
|
|
|||
Loading…
Reference in a new issue