|
|
|
@ -914,4 +914,32 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { |
|
|
|
$this->assertEquals('identifier:\Auth\Mechanism', $storage2->getAuthMechanism()->getIdentifier()); |
|
|
|
} |
|
|
|
|
|
|
|
public function testReadEmptyMountPoint() { |
|
|
|
$configFile = $this->dataDir . '/mount.json'; |
|
|
|
|
|
|
|
$json = [ |
|
|
|
'user' => [ |
|
|
|
'user1' => [ |
|
|
|
'/$user/files/' => [ |
|
|
|
'backend' => 'identifier:\OCA\Files_External\Lib\Backend\SFTP', |
|
|
|
'authMechanism' => 'identifier:\Auth\Mechanism', |
|
|
|
'options' => [], |
|
|
|
'mountOptions' => [], |
|
|
|
], |
|
|
|
] |
|
|
|
] |
|
|
|
]; |
|
|
|
|
|
|
|
file_put_contents($configFile, json_encode($json)); |
|
|
|
|
|
|
|
$allStorages = $this->service->getAllStorages(); |
|
|
|
|
|
|
|
$this->assertCount(1, $allStorages); |
|
|
|
|
|
|
|
$storage1 = $allStorages[1]; |
|
|
|
|
|
|
|
$this->assertEquals('/', $storage1->getMountPoint()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |