aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/cache/cache.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/lib/files/cache/cache.php b/tests/lib/files/cache/cache.php
index 5a8d79b902c..57a154d295c 100644
--- a/tests/lib/files/cache/cache.php
+++ b/tests/lib/files/cache/cache.php
@@ -99,6 +99,17 @@ class Cache extends \UnitTestCase {
$this->assertEqual($value, $cachedData[$name]);
}
}
+
+ $file4 = 'folder/unkownSize';
+ $fileData['unkownSize'] = array('size' => -1, 'mtime' => 25, 'mimetype' => 'foo/file');
+ $this->cache->put($file4, $fileData['unkownSize']);
+
+ $this->assertEquals(-1, $this->cache->calculateFolderSize($file1));
+
+ $fileData['unkownSize'] = array('size' => 5, 'mtime' => 25, 'mimetype' => 'foo/file');
+ $this->cache->put($file4, $fileData['unkownSize']);
+
+ $this->assertEquals(1025, $this->cache->calculateFolderSize($file1));
}
function testStatus() {