aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r--apps/files_trashbin/tests/storage.php3
-rw-r--r--apps/files_trashbin/tests/trashbin.php3
2 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_trashbin/tests/storage.php b/apps/files_trashbin/tests/storage.php
index 387bb20c6d4..30735fe7bc3 100644
--- a/apps/files_trashbin/tests/storage.php
+++ b/apps/files_trashbin/tests/storage.php
@@ -75,7 +75,8 @@ class Storage extends \Test\TestCase {
protected function tearDown() {
\OC\Files\Filesystem::getLoader()->removeStorageWrapper('oc_trashbin');
$this->logout();
- \OC_User::deleteUser($this->user);
+ $user = \OC::$server->getUserManager()->get($this->user);
+ if ($user !== null) { $user->delete(); }
\OC_Hook::clear();
parent::tearDown();
}
diff --git a/apps/files_trashbin/tests/trashbin.php b/apps/files_trashbin/tests/trashbin.php
index e8d586816c3..9c19b67a904 100644
--- a/apps/files_trashbin/tests/trashbin.php
+++ b/apps/files_trashbin/tests/trashbin.php
@@ -88,7 +88,8 @@ class Test_Trashbin extends \Test\TestCase {
public static function tearDownAfterClass() {
// cleanup test user
- \OC_User::deleteUser(self::TEST_TRASHBIN_USER1);
+ $user = \OC::$server->getUserManager()->get(self::TEST_TRASHBIN_USER1);
+ if ($user !== null) { $user->delete(); }
\OC::$server->getConfig()->setSystemValue('trashbin_retention_obligation', self::$rememberRetentionObligation);