Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-09-08 16:34:18 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-09-18 12:55:15 +0300
commite3e78f809d55533acb7b6d2f77fa9516d402e244 (patch)
treeb64e6e6a78f4a4955c46d957090005c9cf531938 /tests
parent5247a0685d52b3889339cc5535b9b2a051ee03f2 (diff)
create new mounts every time the mount provider is called
important for storage wrappers
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/traits/mountprovidertrait.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/lib/traits/mountprovidertrait.php b/tests/lib/traits/mountprovidertrait.php
index 66eca1597c8..bccb5b693ee 100644
--- a/tests/lib/traits/mountprovidertrait.php
+++ b/tests/lib/traits/mountprovidertrait.php
@@ -32,7 +32,7 @@ trait MountProviderTrait {
if (!isset($this->mounts[$userId])) {
$this->mounts[$userId] = [];
}
- $this->mounts[$userId][] = new MountPoint($storage, $mountPoint, $arguments, $this->storageFactory);
+ $this->mounts[$userId][] = ['storage' => $storage, 'mountPoint' => $mountPoint, 'arguments' => $arguments];
}
protected function registerStorageWrapper($name, $wrapper) {
@@ -46,7 +46,9 @@ trait MountProviderTrait {
->method('getMountsForUser')
->will($this->returnCallback(function (IUser $user) {
if (isset($this->mounts[$user->getUID()])) {
- return $this->mounts[$user->getUID()];
+ return array_map(function ($config) {
+ return new MountPoint($config['storage'], $config['mountPoint'], $config['arguments'], $this->storageFactory);
+ }, $this->mounts[$user->getUID()]);
} else {
return [];
}