[Pkg-owncloud-commits] [owncloud] 22/457: fix tests

David Prévot taffit at moszumanska.debian.org
Sun Jun 28 20:05:18 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 415f16eb24138e75be25f66ac261dd08cb269cc9
Author: Robin Appelman <icewind at owncloud.com>
Date:   Mon May 11 15:22:05 2015 +0200

    fix tests
---
 apps/files_sharing/tests/controller/sharecontroller.php | 5 +----
 apps/files_sharing/tests/testcase.php                   | 1 +
 tests/lib/testcase.php                                  | 1 +
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/apps/files_sharing/tests/controller/sharecontroller.php b/apps/files_sharing/tests/controller/sharecontroller.php
index 64ee5b8..3a8a282 100644
--- a/apps/files_sharing/tests/controller/sharecontroller.php
+++ b/apps/files_sharing/tests/controller/sharecontroller.php
@@ -78,10 +78,7 @@ class ShareControllerTest extends \Test\TestCase {
 
 		\OC_User::createUser($this->user, $this->user);
 		\OC_Util::tearDownFS();
-		\OC_User::setUserId('');
-		Filesystem::tearDown();
-		\OC_User::setUserId($this->user);
-		\OC_Util::setupFS($this->user);
+		$this->loginAsUser($this->user);
 
 		// Create a dummy shared file
 		$view = new View('/'. $this->user . '/files');
diff --git a/apps/files_sharing/tests/testcase.php b/apps/files_sharing/tests/testcase.php
index b9e9f07..7533b13 100644
--- a/apps/files_sharing/tests/testcase.php
+++ b/apps/files_sharing/tests/testcase.php
@@ -153,6 +153,7 @@ abstract class TestCase extends \Test\TestCase {
 		\OC::$server->getUserSession()->setUser(null);
 		\OC\Files\Filesystem::tearDown();
 		\OC::$server->getUserSession()->login($user, $password);
+		\OC::$server->getUserFolder($user);
 
 		\OC_Util::setupFS($user);
 	}
diff --git a/tests/lib/testcase.php b/tests/lib/testcase.php
index 76d5662..3b7ad2a 100644
--- a/tests/lib/testcase.php
+++ b/tests/lib/testcase.php
@@ -174,6 +174,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
 		\OC\Files\Filesystem::tearDown();
 		\OC_User::setUserId($user);
 		\OC_Util::setupFS($user);
+		\OC::$server->getUserFolder($user);
 	}
 
 	/**

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list