Have the filecache updater testcase clean the filesystem properly

This commit is contained in:
Robin Appelman 2013-04-25 16:56:48 +02:00
parent 31d7f4df2a
commit cea56df59e
2 changed files with 4 additions and 6 deletions

View File

@ -311,6 +311,7 @@ class Filesystem {
*/
static public function tearDown() {
self::clearMounts();
self::$defaultInstance = null;
}
/**

View File

@ -42,14 +42,11 @@ class Updater extends \PHPUnit_Framework_TestCase {
$this->scanner->scan('');
$this->cache = $this->storage->getCache();
\OC\Files\Filesystem::tearDown();
if (!self::$user) {
if (!\OC\Files\Filesystem::getView()) {
self::$user = uniqid();
\OC\Files\Filesystem::init(self::$user, '/' . self::$user . '/files');
} else {
self::$user = \OC_User::getUser();
}
self::$user = uniqid();
}
\OC\Files\Filesystem::init(self::$user, '/' . self::$user . '/files');
Filesystem::clearMounts();
Filesystem::mount($this->storage, array(), '/' . self::$user . '/files');