summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <morris.jobke@gmail.com>2013-10-30 15:39:55 +0100
committerMorris Jobke <morris.jobke@gmail.com>2013-10-30 15:39:55 +0100
commitb65b7965ae18cbad09b8feda512f85354dd77bf0 (patch)
tree528d43cf26cc8c466390e04ac6e56aa82ebb93b4 /tests
parent4c964cbbbe2b92d6220410cda5e7905e529fc713 (diff)
downloadnextcloud-server-b65b7965ae18cbad09b8feda512f85354dd77bf0.tar.gz
nextcloud-server-b65b7965ae18cbad09b8feda512f85354dd77bf0.zip
fix failing preview test on master
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/preview.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/lib/preview.php b/tests/lib/preview.php
index d0cdd2c44fb..353b66fd6d6 100644
--- a/tests/lib/preview.php
+++ b/tests/lib/preview.php
@@ -134,13 +134,11 @@ class Preview extends \PHPUnit_Framework_TestCase {
}
private function initFS() {
- if(\OC\Files\Filesystem::getView()){
- $user = \OC_User::getUser();
- }else{
- $user=uniqid();
- \OC_User::setUserId($user);
- \OC\Files\Filesystem::init($user, '/'.$user.'/files');
- }
+ // create a new user with his own filesystem view
+ // this gets called by each test in this test class
+ $user=uniqid();
+ \OC_User::setUserId($user);
+ \OC\Files\Filesystem::init($user, '/'.$user.'/files');
\OC\Files\Filesystem::mount('OC\Files\Storage\Temporary', array(), '/');