aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/ViewTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Files/ViewTest.php')
-rw-r--r--tests/lib/Files/ViewTest.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php
index a6a7722f363..7cebfd01b03 100644
--- a/tests/lib/Files/ViewTest.php
+++ b/tests/lib/Files/ViewTest.php
@@ -26,6 +26,7 @@ use OCP\Files\GenericFileException;
use OCP\Files\Mount\IMountManager;
use OCP\Files\Storage\IStorage;
use OCP\IDBConnection;
+use OCP\IUserManager;
use OCP\Lock\ILockingProvider;
use OCP\Lock\LockedException;
use OCP\Server;
@@ -100,8 +101,8 @@ class ViewTest extends \Test\TestCase {
parent::setUp();
\OC_Hook::clear();
- \OC_User::clearBackends();
- \OC_User::useBackend(new \Test\Util\User\Dummy());
+ Server::get(IUserManager::class)->clearBackends();
+ Server::get(IUserManager::class)->registerBackend(new \Test\Util\User\Dummy());
//login
$userManager = \OC::$server->getUserManager();