Have the filecache updater testcase clean the filesystem properly

remotes/origin/stable6
Robin Appelman 12 years ago
parent 31d7f4df2a
commit cea56df59e
  1. 1
      lib/files/filesystem.php
  2. 9
      tests/lib/files/cache/updater.php

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

@ -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');

Loading…
Cancel
Save