summaryrefslogtreecommitdiffstats
path: root/tests/lib/share
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2015-12-17 15:59:23 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2015-12-17 16:18:40 +0100
commit1f715289bf1cafb7e51dce7a4ab478dd3db5088e (patch)
tree81d3623bff851e08b205cfc3bbefc5c886ef530e /tests/lib/share
parent9201b9713ed21566f90628d41c49056ca5314096 (diff)
downloadnextcloud-server-1f715289bf1cafb7e51dce7a4ab478dd3db5088e.tar.gz
nextcloud-server-1f715289bf1cafb7e51dce7a4ab478dd3db5088e.zip
Removed deprecated function OC_User::deleteUser
Replaced with proper OCP calls
Diffstat (limited to 'tests/lib/share')
-rw-r--r--tests/lib/share/share.php24
1 files changed, 16 insertions, 8 deletions
diff --git a/tests/lib/share/share.php b/tests/lib/share/share.php
index 273073239c9..5162a03f367 100644
--- a/tests/lib/share/share.php
+++ b/tests/lib/share/share.php
@@ -94,13 +94,20 @@ class Test_Share extends \Test\TestCase {
$query->execute(array('test'));
\OC::$server->getAppConfig()->setValue('core', 'shareapi_allow_resharing', $this->resharing);
- OC_User::deleteUser($this->user1);
- OC_User::deleteUser($this->user2);
- OC_User::deleteUser($this->user3);
- OC_User::deleteUser($this->user4);
- OC_User::deleteUser($this->user5);
- OC_User::deleteUser($this->user6);
- OC_User::deleteUser($this->groupAndUser);
+ $user = \OC::$server->getUserManager()->get($this->user1);
+ if ($user !== null) { $user->delete(); }
+ $user = \OC::$server->getUserManager()->get($this->user2);
+ if ($user !== null) { $user->delete(); }
+ $user = \OC::$server->getUserManager()->get($this->user3);
+ if ($user !== null) { $user->delete(); }
+ $user = \OC::$server->getUserManager()->get($this->user4);
+ if ($user !== null) { $user->delete(); }
+ $user = \OC::$server->getUserManager()->get($this->user5);
+ if ($user !== null) { $user->delete(); }
+ $user = \OC::$server->getUserManager()->get($this->user6);
+ if ($user !== null) { $user->delete(); }
+ $user = \OC::$server->getUserManager()->get($this->groupAndUser);
+ if ($user !== null) { $user->delete(); }
OC_Group::deleteGroup($this->group1);
OC_Group::deleteGroup($this->group2);
@@ -375,7 +382,8 @@ class Test_Share extends \Test\TestCase {
// Remove user
OC_User::setUserId($this->user1);
- OC_User::deleteUser($this->user1);
+ $user = \OC::$server->getUserManager()->get($this->user1);
+ if ($user !== null) { $user->delete(); }
OC_User::setUserId($this->user2);
$this->assertEquals(array('test1.txt'), OCP\Share::getItemsSharedWith('test', Test_Share_Backend::FORMAT_TARGET));
}