diff options
Diffstat (limited to 'apps/files_external/tests/controller/userstoragescontrollertest.php')
-rw-r--r-- | apps/files_external/tests/controller/userstoragescontrollertest.php | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/apps/files_external/tests/controller/userstoragescontrollertest.php b/apps/files_external/tests/controller/userstoragescontrollertest.php index b61174b0797..9f1a8df8d2e 100644 --- a/apps/files_external/tests/controller/userstoragescontrollertest.php +++ b/apps/files_external/tests/controller/userstoragescontrollertest.php @@ -49,21 +49,15 @@ class UserStoragesControllerTest extends StoragesControllerTest { } public function testAddOrUpdateStorageDisallowedBackend() { - $backend1 = $this->getBackendMock(); - $backend1->expects($this->once()) - ->method('isPermitted') - ->with(BackendService::USER_PERSONAL, BackendService::PERMISSION_CREATE) - ->willReturn(false); - $backend2 = $this->getBackendMock(); - $backend2->expects($this->once()) - ->method('isPermitted') - ->with(BackendService::USER_PERSONAL, BackendService::PERMISSION_MODIFY) + $backend = $this->getBackendMock(); + $backend->method('isVisibleFor') + ->with(BackendService::VISIBILITY_PERSONAL) ->willReturn(false); $authMech = $this->getAuthMechMock(); $storageConfig = new StorageConfig(1); $storageConfig->setMountPoint('mount'); - $storageConfig->setBackend($backend1); + $storageConfig->setBackend($backend); $storageConfig->setAuthMechanism($authMech); $storageConfig->setBackendOptions([]); @@ -88,8 +82,6 @@ class UserStoragesControllerTest extends StoragesControllerTest { $this->assertEquals(Http::STATUS_UNPROCESSABLE_ENTITY, $response->getStatus()); - $storageConfig->setBackend($backend2); - $response = $this->controller->update( 1, 'mount', |