aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/Cache/Wrapper/CacheJailTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Files/Cache/Wrapper/CacheJailTest.php')
-rw-r--r--tests/lib/Files/Cache/Wrapper/CacheJailTest.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/lib/Files/Cache/Wrapper/CacheJailTest.php b/tests/lib/Files/Cache/Wrapper/CacheJailTest.php
index aed13c41ac0..57024e2eb79 100644
--- a/tests/lib/Files/Cache/Wrapper/CacheJailTest.php
+++ b/tests/lib/Files/Cache/Wrapper/CacheJailTest.php
@@ -8,6 +8,7 @@
namespace Test\Files\Cache\Wrapper;
use OC\Files\Cache\Wrapper\CacheJail;
+use OC\Files\Cache\Wrapper\CacheWrapper;
use OC\Files\Search\SearchComparison;
use OC\Files\Search\SearchQuery;
use OC\Files\Storage\Wrapper\Jail;
@@ -252,4 +253,14 @@ class CacheJailTest extends CacheTest {
$storage->getWatcher()->update('bar', ['mimetype' => 'text/plain']);
$this->assertTrue($this->cache->inCache('bar'));
}
+
+ public function testUnJailedRoot(): void {
+ $jail1 = new CacheJail($this->sourceCache, 'foo');
+ $jail2 = new CacheJail($jail1, 'bar');
+ $this->assertEquals('foo/bar', $jail2->getGetUnjailedRoot());
+
+ $middleWrapper = new CacheWrapper($jail1);
+ $jail3 = new CacheJail($middleWrapper, 'bar');
+ $this->assertEquals('foo/bar', $jail3->getGetUnjailedRoot());
+ }
}