Fix tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-04-04 12:50:54 +02:00
parent 37233471b6
commit 73e6eea57e
No known key found for this signature in database
GPG Key ID: F941078878347C0C
3 changed files with 8 additions and 4 deletions

View File

@ -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])) {

View File

@ -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

View File

@ -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())