Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>2015-05-25 18:50:32 +0300
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>2015-05-25 18:50:32 +0300
commitd10c3844766897136ab9fe0138caa0ab01607b6f (patch)
tree8f66e00887ffe309926a3a23e32bcfc18b64719d /tests
parent9854608bf35e1b57da05696d4b73941fa9b894f6 (diff)
Fix documentCreate test
Diffstat (limited to 'tests')
-rw-r--r--tests/controller/documentcontrollertest.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/controller/documentcontrollertest.php b/tests/controller/documentcontrollertest.php
index e3f1a8f4..cebdb566 100644
--- a/tests/controller/documentcontrollertest.php
+++ b/tests/controller/documentcontrollertest.php
@@ -41,10 +41,13 @@ class DocumentControllerTest extends \PHPUnit_Framework_TestCase {
$this->uid
);
- if (!\OCP\User::userExists($this->uid)){
- \OC_User::createUser($this->uid, $this->password);
+ $userManager = \OC::$server->getUserManager();
+ $userSession = \OC::$server->getUserSession();
+ if (!$userManager->userExists($this->uid)){
+ $userManager->createUser($this->uid, $this->password);
+ \OC::$server->getUserFolder($this->uid);
}
- \OC_User::getUserSession()->login($this->uid, $this->password);
+ $userSession->login($this->uid, $this->password);
\OC_Util::setupFS();
}