summaryrefslogtreecommitdiffstats
path: root/tests/lib/files/cache
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-03-30 17:29:05 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:28 +0200
commit0eee3a2618235bcb59ce1bcb98526a7592de4578 (patch)
tree760c65a1a61f5dc928e8f80516fb9c58ea43040b /tests/lib/files/cache
parentd185761d31f4845e9bf39dbbe0c61d199689deb7 (diff)
downloadnextcloud-server-0eee3a2618235bcb59ce1bcb98526a7592de4578.tar.gz
nextcloud-server-0eee3a2618235bcb59ce1bcb98526a7592de4578.zip
remove unencrypted_size from the cache, size will contain the unencrypted size
Diffstat (limited to 'tests/lib/files/cache')
-rw-r--r--tests/lib/files/cache/cache.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/lib/files/cache/cache.php b/tests/lib/files/cache/cache.php
index f0ad6cf3ab1..3d7f77cb54e 100644
--- a/tests/lib/files/cache/cache.php
+++ b/tests/lib/files/cache/cache.php
@@ -183,8 +183,8 @@ class Cache extends \Test\TestCase {
$file3 = 'folder/foo';
$data1 = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory');
$fileData = array();
- $fileData['bar'] = array('size' => 1000, 'unencrypted_size' => 900, 'encrypted' => 1, 'mtime' => 20, 'mimetype' => 'foo/file');
- $fileData['foo'] = array('size' => 20, 'unencrypted_size' => 16, 'encrypted' => 1, 'mtime' => 25, 'mimetype' => 'foo/file');
+ $fileData['bar'] = array('size' => 1000, 'encrypted' => 1, 'mtime' => 20, 'mimetype' => 'foo/file');
+ $fileData['foo'] = array('size' => 20, 'encrypted' => 1, 'mtime' => 25, 'mimetype' => 'foo/file');
$this->cache->put($file1, $data1);
$this->cache->put($file2, $fileData['bar']);
@@ -194,8 +194,6 @@ class Cache extends \Test\TestCase {
$this->assertEquals(count($content), 2);
foreach ($content as $cachedData) {
$data = $fileData[$cachedData['name']];
- // indirect retrieval swaps unencrypted_size and size
- $this->assertEquals($data['unencrypted_size'], $cachedData['size']);
}
$file4 = 'folder/unkownSize';
@@ -211,7 +209,6 @@ class Cache extends \Test\TestCase {
// direct cache entry retrieval returns the original values
$entry = $this->cache->get($file1);
$this->assertEquals(1025, $entry['size']);
- $this->assertEquals(916, $entry['unencrypted_size']);
$this->cache->remove($file2);
$this->cache->remove($file3);