aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/Storage/Wrapper
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-02-02 15:45:34 +0100
committerJoas Schilling <coding@schilljs.com>2021-02-15 10:36:08 +0100
commit645f83121eb9bdc936c404ac8dbad346c2b934e3 (patch)
tree4556c7b6e70064271ec8f49176a7fd5545d86cea /tests/lib/Files/Storage/Wrapper
parentb418a680e7431dd39acfdc1c52c693ae777a8c83 (diff)
downloadnextcloud-server-645f83121eb9bdc936c404ac8dbad346c2b934e3.tar.gz
nextcloud-server-645f83121eb9bdc936c404ac8dbad346c2b934e3.zip
Cache the user backend info for 300s
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/Files/Storage/Wrapper')
-rw-r--r--tests/lib/Files/Storage/Wrapper/EncryptionTest.php22
1 files changed, 19 insertions, 3 deletions
diff --git a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php
index eccec7c28d5..8bdb48fd854 100644
--- a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php
+++ b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php
@@ -17,6 +17,7 @@ use OCP\Encryption\Keys\IStorage;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Cache\ICache;
use OCP\Files\Mount\IMountPoint;
+use OCP\ICacheFactory;
use OCP\IConfig;
use OCP\ILogger;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
@@ -131,7 +132,12 @@ class EncryptionTest extends Storage {
$this->util = $this->getMockBuilder('\OC\Encryption\Util')
->setMethods(['getUidAndFilename', 'isFile', 'isExcluded'])
- ->setConstructorArgs([new View(), new Manager($this->config, $this->createMock(EventDispatcherInterface::class), $this->createMock(IEventDispatcher::class)), $this->groupManager, $this->config, $this->arrayCache])
+ ->setConstructorArgs([new View(), new Manager(
+ $this->config,
+ $this->createMock(EventDispatcherInterface::class),
+ $this->createMock(ICacheFactory::class),
+ $this->createMock(IEventDispatcher::class)
+ ), $this->groupManager, $this->config, $this->arrayCache])
->getMock();
$this->util->expects($this->any())
->method('getUidAndFilename')
@@ -567,7 +573,12 @@ class EncryptionTest extends Storage {
->setConstructorArgs(
[
new View(),
- new Manager($this->config, $this->createMock(EventDispatcherInterface::class), $this->createMock(IEventDispatcher::class)),
+ new Manager(
+ $this->config,
+ $this->createMock(EventDispatcherInterface::class),
+ $this->createMock(ICacheFactory::class),
+ $this->createMock(IEventDispatcher::class)
+ ),
$this->groupManager,
$this->config,
$this->arrayCache
@@ -635,7 +646,12 @@ class EncryptionTest extends Storage {
->willReturn($exists);
$util = $this->getMockBuilder('\OC\Encryption\Util')
- ->setConstructorArgs([new View(), new Manager($this->config, $this->createMock(EventDispatcherInterface::class), $this->createMock(IEventDispatcher::class)), $this->groupManager, $this->config, $this->arrayCache])
+ ->setConstructorArgs([new View(), new Manager(
+ $this->config,
+ $this->createMock(EventDispatcherInterface::class),
+ $this->createMock(ICacheFactory::class),
+ $this->createMock(IEventDispatcher::class)
+ ), $this->groupManager, $this->config, $this->arrayCache])
->getMock();
$cache = $this->getMockBuilder('\OC\Files\Cache\Cache')