From d10c3844766897136ab9fe0138caa0ab01607b6f Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Mon, 25 May 2015 18:50:32 +0300 Subject: [PATCH] Fix documentCreate test --- tests/controller/documentcontrollertest.php | 9 ++++++--- 1 file 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(); }