]> source.dussan.org Git - nextcloud-server.git/commitdiff
Resolves cache tests failing if the directory length is longer than 64
authorClark Tomlinson <fallen013@gmail.com>
Wed, 17 Sep 2014 20:24:43 +0000 (16:24 -0400)
committerClark Tomlinson <fallen013@gmail.com>
Wed, 17 Sep 2014 20:24:43 +0000 (16:24 -0400)
tests/lib/files/cache/cache.php

index 03fe4b26e7f7acb74bbef8719d4450853ea23ce5..969740419c685c4c297cbdca190d28dde88cbd59 100644 (file)
@@ -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));
        }