summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorClark Tomlinson <fallen013@gmail.com>2014-09-17 16:24:43 -0400
committerClark Tomlinson <fallen013@gmail.com>2014-09-17 16:24:43 -0400
commit55d56f2f0fa880e7837e055a98a011587f24ab3d (patch)
tree6fae7f491edd24661f1ce290d27a7431179a59dd /tests
parent7db0d5512910e768912f615cb408677e38735d91 (diff)
downloadnextcloud-server-55d56f2f0fa880e7837e055a98a011587f24ab3d.tar.gz
nextcloud-server-55d56f2f0fa880e7837e055a98a011587f24ab3d.zip
Resolves cache tests failing if the directory length is longer than 64
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/cache/cache.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/lib/files/cache/cache.php b/tests/lib/files/cache/cache.php
index 03fe4b26e7f..969740419c6 100644
--- a/tests/lib/files/cache/cache.php
+++ b/tests/lib/files/cache/cache.php
@@ -336,6 +336,10 @@ class Cache extends \PHPUnit_Framework_TestCase {
$storageId = $this->storage->getId();
$data = array('size' => 1000, 'mtime' => 20, 'mimetype' => 'foo/file');
$id = $this->cache->put('foo', $data);
+
+ if (strlen($storageId) > 64) {
+ $storageId = md5($storageId);
+ }
$this->assertEquals(array($storageId, 'foo'), \OC\Files\Cache\Cache::getById($id));
}