diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-06-26 20:48:54 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-06-26 20:48:54 +0200 |
commit | 0c680b46cdfe5106d87ad807657c9d2e558b4a73 (patch) | |
tree | 7c267d4e93d7596b75bccb4299b7ebcc3fd89d0c /tests/lib/files/view.php | |
parent | a9ee15cf405bd61c50856d3cc47ce6ecdfac0841 (diff) | |
download | nextcloud-server-0c680b46cdfe5106d87ad807657c9d2e558b4a73.tar.gz nextcloud-server-0c680b46cdfe5106d87ad807657c9d2e558b4a73.zip |
View test needs a dummy user
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(); |