summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-01-22 20:57:15 +0100
committerRobin Appelman <icewind@owncloud.com>2013-01-22 20:57:15 +0100
commit7330fcf5e81e7d91ed37f01da7cc45833e10f1c4 (patch)
tree2a6e137a21d42902be616adfe9e2d4aee60bfaef /tests
parentdb2b485b9681b93200bcca6b5780b78008f9c1de (diff)
downloadnextcloud-server-7330fcf5e81e7d91ed37f01da7cc45833e10f1c4.tar.gz
nextcloud-server-7330fcf5e81e7d91ed37f01da7cc45833e10f1c4.zip
Cache: make mounts overwrite existing folders, prevents duplicate entries
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/view.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php
index 53271142672..586ad178425 100644
--- a/tests/lib/files/view.php
+++ b/tests/lib/files/view.php
@@ -98,6 +98,18 @@ class View extends \PHPUnit_Framework_TestCase {
$this->assertEquals(array(), $rootView->getDirectoryContent('/non/existing'));
}
+ function testMountPointOverwrite() {
+ $storage1 = $this->getTestStorage(false);
+ $storage2 = $this->getTestStorage();
+ $storage1->mkdir('substorage');
+ \OC\Files\Filesystem::mount($storage1, array(), '/');
+ \OC\Files\Filesystem::mount($storage2, array(), '/substorage');
+
+ $rootView = new \OC\Files\View('');
+ $folderContent = $rootView->getDirectoryContent('/');
+ $this->assertEquals(4, count($folderContent));
+ }
+
function testCacheIncompleteFolder() {
$storage1 = $this->getTestStorage(false);
\OC\Files\Filesystem::mount($storage1, array(), '/');