/** * @expectedException \DomainException */ public function testAddStorage($storageParams = null) { $backend = $this->backendService->getBackend('identifier:\\OCA\\Files_External\\Lib\\Backend\\SMB'); $authMechanism = $this->backendService->getAuthMechanism('identifier:\\Auth\\Mechanism'); $storage = new StorageConfig(255); $storage->setMountPoint('mountpoint'); $storage->setBackend($backend); $storage->setAuthMechanism($authMechanism); $storage->setBackendOptions(['password' => 'testPassword']); $this->service->addStorage($storage); }