]> source.dussan.org Git - nextcloud-server.git/commitdiff
Have the filecache updater testcase clean the filesystem properly
authorRobin Appelman <icewind@owncloud.com>
Thu, 25 Apr 2013 14:56:48 +0000 (16:56 +0200)
committerRobin Appelman <icewind@owncloud.com>
Thu, 25 Apr 2013 14:56:48 +0000 (16:56 +0200)
lib/files/filesystem.php
tests/lib/files/cache/updater.php

index c0e9d215fb5ddc8d8c73f49665d6257f6de81db7..edd37d7b46845ff0e323d40e5fc9c7e1ee96be4f 100644 (file)
@@ -311,6 +311,7 @@ class Filesystem {
         */
        static public function tearDown() {
                self::clearMounts();
+               self::$defaultInstance = null;
        }
 
        /**
index aaf932c97feb88a086d4545e7c7b4bd44d348c70..dad3cd7e6503cf671375fd1049bc8b7cc3e3f9fa 100644 (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');