Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-11-18 20:29:30 +0400
committerVincent Petry <pvince81@owncloud.com>2013-11-19 12:47:36 +0400
commit9ccaf85078da4efa28e5d4a7315459b1c8c68e9e (patch)
tree15d4979840cc46702a6b8c23582cc8e704a2d67a /tests
parentfbf1b127db2421b47874ee49be89d9dbaa6c2dda (diff)
External storage space is now not counted in total space
Added argument to getFileInfo() to disable adding the size of mountpoints to a directory's size. Backport of 614e4d485c8b74f6879c401f8cbb93e9335bf9b3
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/view.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php
index 732f61dc5bd..b1edb73a6d8 100644
--- a/tests/lib/files/view.php
+++ b/tests/lib/files/view.php
@@ -57,6 +57,11 @@ class View extends \PHPUnit_Framework_TestCase {
$this->assertEquals($storageSize * 3, $cachedData['size']);
$this->assertEquals('httpd/unix-directory', $cachedData['mimetype']);
+ // get cached data excluding mount points
+ $cachedData = $rootView->getFileInfo('/', false);
+ $this->assertEquals($storageSize, $cachedData['size']);
+ $this->assertEquals('httpd/unix-directory', $cachedData['mimetype']);
+
$cachedData = $rootView->getFileInfo('/folder');
$this->assertEquals($storageSize + $textSize, $cachedData['size']);
$this->assertEquals('httpd/unix-directory', $cachedData['mimetype']);