diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-10-27 14:09:45 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-10-29 11:31:18 +0100 |
commit | c6f6a8758b3f08e47c3a8f45a67d09698376b2e2 (patch) | |
tree | bfd52190961e28ae97fa65a96df05b1fe0390a2f /apps/provisioning_api/tests/groupstest.php | |
parent | f428d31a5d1f91c6e7aa96fd8550c75c02cc0963 (diff) | |
download | nextcloud-server-c6f6a8758b3f08e47c3a8f45a67d09698376b2e2.tar.gz nextcloud-server-c6f6a8758b3f08e47c3a8f45a67d09698376b2e2.zip |
Drop OC_SubAdmin and replace usages
Diffstat (limited to 'apps/provisioning_api/tests/groupstest.php')
-rw-r--r-- | apps/provisioning_api/tests/groupstest.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/provisioning_api/tests/groupstest.php b/apps/provisioning_api/tests/groupstest.php index c75ba76bd35..f67ed1c36ae 100644 --- a/apps/provisioning_api/tests/groupstest.php +++ b/apps/provisioning_api/tests/groupstest.php @@ -1,6 +1,7 @@ <?php /** * @author Joas Schilling <nickvergessen@owncloud.com> + * @author Lukas Reschke <lukas@owncloud.com> * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <rullzer@owncloud.com> * @author Tom Needham <tom@owncloud.com> @@ -29,15 +30,14 @@ use OCP\IGroupManager; use OCP\IUserSession; class GroupsTest extends TestCase { - /** @var IUserManager */ protected $userManager; - /** @var IGroupManager */ protected $groupManager; - /** @var IUserSession */ protected $userSession; + /** @var \OCA\Provisioning_API\Groups */ + protected $api; protected function setup() { parent::setup(); @@ -114,7 +114,7 @@ class GroupsTest extends TestCase { $group->addUser($users[0]); $group->addUser($users[1]); - \OC_SubAdmin::createSubAdmin($users[0]->getUID(), $group->getGID()); + $this->groupManager->getSubAdmin()->createSubAdmin($users[0], $group); $result = $this->api->getGroup([ 'groupid' => $group->getGID(), @@ -147,7 +147,7 @@ class GroupsTest extends TestCase { $group1->addUser($users[1]); $group2->addUser($users[0]); - \OC_SubAdmin::createSubAdmin($users[0]->getUID(), $group2->getGID()); + $this->groupManager->getSubAdmin()->createSubAdmin($users[0], $group2); $result = $this->api->getGroup([ 'groupid' => $group1->getGID(), @@ -196,7 +196,7 @@ class GroupsTest extends TestCase { $this->userSession->setUser($user1); $this->groupManager->get('admin')->addUser($user1); $group1 = $this->groupManager->createGroup($this->getUniqueID()); - \OC_SubAdmin::createSubAdmin($user2->getUID(), $group1->getGID()); + $this->groupManager->getSubAdmin()->createSubAdmin($user2, $group1); $result = $this->api->getSubAdminsOfGroup([ 'groupid' => $group1->getGID(), ]); |