From e3e78f809d55533acb7b6d2f77fa9516d402e244 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 8 Sep 2015 15:34:18 +0200 Subject: [PATCH] create new mounts every time the mount provider is called important for storage wrappers --- tests/lib/traits/mountprovidertrait.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/lib/traits/mountprovidertrait.php b/tests/lib/traits/mountprovidertrait.php index 66eca1597c..bccb5b693e 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 []; }