diff options
Diffstat (limited to 'tests/lib/files/view.php')
-rw-r--r-- | tests/lib/files/view.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php index 830913a91ad..3bac9e770aa 100644 --- a/tests/lib/files/view.php +++ b/tests/lib/files/view.php @@ -20,10 +20,19 @@ class View extends \PHPUnit_Framework_TestCase { private $storages = array(); public function setUp() { + \OC_User::clearBackends(); + \OC_User::useBackend(new \OC_User_Dummy()); + + //login + \OC_User::createUser('test', 'test'); + $this->user=\OC_User::getUser(); + \OC_User::setUserId('test'); + \OC\Files\Filesystem::clearMounts(); } public function tearDown() { + \OC_User::setUserId($this->user); foreach ($this->storages as $storage) { $cache = $storage->getCache(); $ids = $cache->getAll(); |