diff options
-rw-r--r-- | lib/private/Files/Mount/Manager.php | 4 | ||||
-rw-r--r-- | lib/public/Files/Mount/IMountManager.php | 4 | ||||
-rw-r--r-- | tests/lib/Files/Storage/Wrapper/EncryptionTest.php | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/lib/private/Files/Mount/Manager.php b/lib/private/Files/Mount/Manager.php index f27dfaacc8b..019dda03a40 100644 --- a/lib/private/Files/Mount/Manager.php +++ b/lib/private/Files/Mount/Manager.php @@ -76,9 +76,9 @@ class Manager implements IMountManager { * Find the mount for $path * * @param string $path - * @return MountPoint + * @return MountPoint|null */ - public function find(string $path): IMountPoint { + public function find(string $path) { \OC_Util::setupFS(); $path = $this->formatPath($path); if (isset($this->mounts[$path])) { diff --git a/lib/public/Files/Mount/IMountManager.php b/lib/public/Files/Mount/IMountManager.php index da40419d9e1..b9ec85bc1d4 100644 --- a/lib/public/Files/Mount/IMountManager.php +++ b/lib/public/Files/Mount/IMountManager.php @@ -61,10 +61,10 @@ interface IMountManager { * Find the mount for $path * * @param string $path - * @return \OCP\Files\Mount\IMountPoint + * @return \OCP\Files\Mount\IMountPoint|null * @since 8.2.0 */ - public function find(string $path): IMountPoint; + public function find(string $path); /** * Find all mounts in $path diff --git a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php index 082c08b3e43..22c93ee0a91 100644 --- a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php +++ b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php @@ -730,6 +730,8 @@ class EncryptionTest extends Storage { $temp = \OC::$server->getTempManager(); return fopen($temp->getTemporaryFile(), $mode); }); + $storage2->method('getId') + ->willReturn('stroage2'); $cache = $this->createMock(ICache::class); $cache->expects($this->once()) ->method('get') @@ -777,6 +779,8 @@ class EncryptionTest extends Storage { $temp = \OC::$server->getTempManager(); return fopen($temp->getTemporaryFile(), $mode); }); + $storage2->method('getId') + ->willReturn('stroage2'); if($expectedEncrypted) { $cache = $this->createMock(ICache::class); $cache->expects($this->once()) |