summaryrefslogtreecommitdiffstats
path: root/tests/lib/preview.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/preview.php')
-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(), '/');