I love unit tests that mock unnecessary stuff
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
dd53fad898
commit
6004f62085
|
@ -95,6 +95,15 @@ class FileCacheTest extends TestCache {
|
||||||
\OC_User::setUserId($this->user);
|
\OC_User::setUserId($this->user);
|
||||||
\OC::$server->getConfig()->setSystemValue('cachedirectory', $this->datadir);
|
\OC::$server->getConfig()->setSystemValue('cachedirectory', $this->datadir);
|
||||||
|
|
||||||
|
if ($this->instance) {
|
||||||
|
$this->instance->clear();
|
||||||
|
$this->instance = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
//tear down the users dir aswell
|
||||||
|
$user = \OC::$server->getUserManager()->get('test');
|
||||||
|
$user->delete();
|
||||||
|
|
||||||
// Restore the original mount point
|
// Restore the original mount point
|
||||||
\OC\Files\Filesystem::clearMounts();
|
\OC\Files\Filesystem::clearMounts();
|
||||||
\OC\Files\Filesystem::mount($this->storage, array(), '/');
|
\OC\Files\Filesystem::mount($this->storage, array(), '/');
|
||||||
|
|
Loading…
Reference in New Issue