Resolves cache tests failing if the directory length is longer than 64

remotes/origin/fix-10825
Clark Tomlinson 2014-09-17 16:24:43 +07:00
parent 7db0d55129
commit 55d56f2f0f
1 changed files with 4 additions and 0 deletions

@ -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));
}