diff options
author | Morris Jobke <morris.jobke@gmail.com> | 2013-10-30 15:39:55 +0100 |
---|---|---|
committer | Morris Jobke <morris.jobke@gmail.com> | 2013-10-30 15:39:55 +0100 |
commit | b65b7965ae18cbad09b8feda512f85354dd77bf0 (patch) | |
tree | 528d43cf26cc8c466390e04ac6e56aa82ebb93b4 /tests | |
parent | 4c964cbbbe2b92d6220410cda5e7905e529fc713 (diff) | |
download | nextcloud-server-b65b7965ae18cbad09b8feda512f85354dd77bf0.tar.gz nextcloud-server-b65b7965ae18cbad09b8feda512f85354dd77bf0.zip |
fix failing preview test on master
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/preview.php | 12 |
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(), '/'); |