diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-09-08 15:34:18 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-09-18 11:55:15 +0200 |
commit | e3e78f809d55533acb7b6d2f77fa9516d402e244 (patch) | |
tree | b64e6e6a78f4a4955c46d957090005c9cf531938 /tests/lib/traits | |
parent | 5247a0685d52b3889339cc5535b9b2a051ee03f2 (diff) | |
download | nextcloud-server-e3e78f809d55533acb7b6d2f77fa9516d402e244.tar.gz nextcloud-server-e3e78f809d55533acb7b6d2f77fa9516d402e244.zip |
create new mounts every time the mount provider is called
important for storage wrappers
Diffstat (limited to 'tests/lib/traits')
-rw-r--r-- | tests/lib/traits/mountprovidertrait.php | 6 |
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 []; } |