summaryrefslogtreecommitdiffstats
path: root/apps
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 /apps
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 'apps')
-rw-r--r--apps/encryption/tests/lib/MigrationTest.php9
-rw-r--r--apps/files/tests/service/tagservice.php3
-rw-r--r--apps/files_sharing/tests/controller/sharecontroller.php3
-rw-r--r--apps/files_sharing/tests/testcase.php9
-rw-r--r--apps/files_trashbin/tests/storage.php3
-rw-r--r--apps/files_trashbin/tests/trashbin.php3
-rw-r--r--apps/files_versions/tests/versions.php6
7 files changed, 24 insertions, 12 deletions
diff --git a/apps/encryption/tests/lib/MigrationTest.php b/apps/encryption/tests/lib/MigrationTest.php
index ec1dccb87b8..6df72ac1bf6 100644
--- a/apps/encryption/tests/lib/MigrationTest.php
+++ b/apps/encryption/tests/lib/MigrationTest.php
@@ -49,9 +49,12 @@ class MigrationTest extends \Test\TestCase {
}
public static function tearDownAfterClass() {
- \OC_User::deleteUser(self::TEST_ENCRYPTION_MIGRATION_USER1);
- \OC_User::deleteUser(self::TEST_ENCRYPTION_MIGRATION_USER2);
- \OC_User::deleteUser(self::TEST_ENCRYPTION_MIGRATION_USER3);
+ $user = \OC::$server->getUserManager()->get(self::TEST_ENCRYPTION_MIGRATION_USER1);
+ if ($user !== null) { $user->delete(); }
+ $user = \OC::$server->getUserManager()->get(self::TEST_ENCRYPTION_MIGRATION_USER2);
+ if ($user !== null) { $user->delete(); }
+ $user = \OC::$server->getUserManager()->get(self::TEST_ENCRYPTION_MIGRATION_USER3);
+ if ($user !== null) { $user->delete(); }
parent::tearDownAfterClass();
}
diff --git a/apps/files/tests/service/tagservice.php b/apps/files/tests/service/tagservice.php
index a34bd05afcc..b93dedd0efd 100644
--- a/apps/files/tests/service/tagservice.php
+++ b/apps/files/tests/service/tagservice.php
@@ -82,7 +82,8 @@ class TagServiceTest extends \Test\TestCase {
protected function tearDown() {
\OC_User::setUserId('');
- \OC_User::deleteUser($this->user);
+ $user = \OC::$server->getUserManager()->get($this->user);
+ if ($user !== null) { $user->delete(); }
}
public function testUpdateFileTags() {
diff --git a/apps/files_sharing/tests/controller/sharecontroller.php b/apps/files_sharing/tests/controller/sharecontroller.php
index d165151b87f..398538f0943 100644
--- a/apps/files_sharing/tests/controller/sharecontroller.php
+++ b/apps/files_sharing/tests/controller/sharecontroller.php
@@ -98,7 +98,8 @@ class ShareControllerTest extends \Test\TestCase {
\OC_Util::tearDownFS();
\OC_User::setUserId('');
Filesystem::tearDown();
- \OC_User::deleteUser($this->user);
+ $user = \OC::$server->getUserManager()->get($this->user);
+ if ($user !== null) { $user->delete(); }
\OC_User::setIncognitoMode(false);
\OC::$server->getSession()->set('public_link_authenticated', '');
diff --git a/apps/files_sharing/tests/testcase.php b/apps/files_sharing/tests/testcase.php
index cc82fc3d949..c4037c7c42e 100644
--- a/apps/files_sharing/tests/testcase.php
+++ b/apps/files_sharing/tests/testcase.php
@@ -117,9 +117,12 @@ abstract class TestCase extends \Test\TestCase {
public static function tearDownAfterClass() {
// cleanup users
- \OC_User::deleteUser(self::TEST_FILES_SHARING_API_USER1);
- \OC_User::deleteUser(self::TEST_FILES_SHARING_API_USER2);
- \OC_User::deleteUser(self::TEST_FILES_SHARING_API_USER3);
+ $user = \OC::$server->getUserManager()->get(self::TEST_FILES_SHARING_API_USER1);
+ if ($user !== null) { $user->delete(); }
+ $user = \OC::$server->getUserManager()->get(self::TEST_FILES_SHARING_API_USER2);
+ if ($user !== null) { $user->delete(); }
+ $user = \OC::$server->getUserManager()->get(self::TEST_FILES_SHARING_API_USER3);
+ if ($user !== null) { $user->delete(); }
// delete group
\OC_Group::deleteGroup(self::TEST_FILES_SHARING_API_GROUP1);
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);
diff --git a/apps/files_versions/tests/versions.php b/apps/files_versions/tests/versions.php
index ffc98c2e98c..ee4978ff784 100644
--- a/apps/files_versions/tests/versions.php
+++ b/apps/files_versions/tests/versions.php
@@ -61,8 +61,10 @@ class Test_Files_Versioning extends \Test\TestCase {
public static function tearDownAfterClass() {
// cleanup test user
- \OC_User::deleteUser(self::TEST_VERSIONS_USER);
- \OC_User::deleteUser(self::TEST_VERSIONS_USER2);
+ $user = \OC::$server->getUserManager()->get(self::TEST_VERSIONS_USER);
+ if ($user !== null) { $user->delete(); }
+ $user = \OC::$server->getUserManager()->get(self::TEST_VERSIONS_USER2);
+ if ($user !== null) { $user->delete(); }
parent::tearDownAfterClass();
}