Merge pull request #488 from owncloud/fix-tests

Fix failing tests
This commit is contained in:
VicDeo 2015-05-25 19:05:23 +03:00
commit 89fb78855e
2 changed files with 6 additions and 4 deletions

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

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<phpunit bootstrap="bootstrap.php"
strict="true"
verbose="true"
timeoutForSmallTests="900"
timeoutForMediumTests="900"