summaryrefslogtreecommitdiffstats
path: root/tests/lib/streamwrappers.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/streamwrappers.php')
-rw-r--r--tests/lib/streamwrappers.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/lib/streamwrappers.php b/tests/lib/streamwrappers.php
index 1b61446f4dc..6f92f487037 100644
--- a/tests/lib/streamwrappers.php
+++ b/tests/lib/streamwrappers.php
@@ -65,7 +65,9 @@ class Test_StreamWrappers extends PHPUnit_Framework_TestCase {
}
public function testOC() {
+ $originalStorage = \OC\Files\Filesystem::getStorage('/');
\OC\Files\Filesystem::clearMounts();
+
$storage = new \OC\Files\Storage\Temporary(array());
$storage->file_put_contents('foo.txt', 'asd');
\OC\Files\Filesystem::mount($storage, array(), '/');
@@ -91,5 +93,8 @@ class Test_StreamWrappers extends PHPUnit_Framework_TestCase {
unlink('oc:///foo.txt');
$this->assertEquals(array('.', '..', 'bar.txt'), scandir('oc:///'));
+
+ \OC\Files\Filesystem::clearMounts();
+ \OC\Files\Filesystem::mount($originalStorage, array(), '/');
}
}