Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
37233471b6
commit
73e6eea57e
|
@ -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])) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue