aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/files/filesystem.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/files/filesystem.php')
-rw-r--r--tests/lib/files/filesystem.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/lib/files/filesystem.php b/tests/lib/files/filesystem.php
index 1de8cba5446..de8979affd1 100644
--- a/tests/lib/files/filesystem.php
+++ b/tests/lib/files/filesystem.php
@@ -340,7 +340,8 @@ class Filesystem extends \Test\TestCase {
$this->assertEquals('home::' . $userId, $homeMount->getId());
}
- \OC_User::deleteUser($userId);
+ $user = \OC::$server->getUserManager()->get($userId);
+ if ($user !== null) { $user->delete(); }
}
/**
@@ -368,7 +369,8 @@ class Filesystem extends \Test\TestCase {
$this->assertTrue($homeMount->instanceOfStorage('\OC\Files\Storage\Home'));
$this->assertEquals('local::' . $datadir . '/' . $userId . '/', $homeMount->getId());
- \OC_User::deleteUser($userId);
+ $user = \OC::$server->getUserManager()->get($userId);
+ if ($user !== null) { $user->delete(); }
// delete storage entry
$cache->clear();
}
@@ -398,7 +400,8 @@ class Filesystem extends \Test\TestCase {
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath('/' . $userId . '/cache');
$this->assertTrue($storage->instanceOfStorage('\OCP\Files\IHomeStorage'));
$this->assertEquals('cache', $internalPath);
- \OC_User::deleteUser($userId);
+ $user = \OC::$server->getUserManager()->get($userId);
+ if ($user !== null) { $user->delete(); }
$config->setSystemValue('cache_path', $oldCachePath);
}
@@ -426,7 +429,8 @@ class Filesystem extends \Test\TestCase {
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath('/' . $userId . '/cache');
$this->assertTrue($storage->instanceOfStorage('\OC\Files\Storage\Local'));
$this->assertEquals('', $internalPath);
- \OC_User::deleteUser($userId);
+ $user = \OC::$server->getUserManager()->get($userId);
+ if ($user !== null) { $user->delete(); }
$config->setSystemValue('cache_path', $oldCachePath);
}