Browse Source

Fix documentCreate test

tags/1.1.22
Victor Dubiniuk 4 years ago
parent
commit
d10c384476
1 changed files with 6 additions and 3 deletions
  1. 6
    3
      tests/controller/documentcontrollertest.php

+ 6
- 3
tests/controller/documentcontrollertest.php View File

@@ -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();
}

Loading…
Cancel
Save