$token,
$validToken,
$createSuccessful,
- $expectedReturnData
+ $expectedReturnData,
+ $permissions
) {
$this->federatedShareProvider->expects($this->any())
->method('isOutgoingServer2serverShareEnabled')
);
$share = $this->share;
+ $share->setPermissions($permissions);
$this->shareManager->expects($this->any())->method('getShareByToken')
->with($token)
public function dataTestCreateFederatedShare() {
return [
//shareWith, outgoingSharesAllowed, validShareWith, token, validToken, createSuccessful, expectedReturnData
- ['user@server', true, true, 'token', true, true, 'server'],
- ['user@server', true, false, 'token', true, true, 'invalid federated cloud id'],
- ['user@server', true, false, 'token', false, true, 'invalid federated cloud id'],
- ['user@server', true, false, 'token', false, false, 'invalid federated cloud id'],
- ['user@server', true, false, 'token', true, false, 'invalid federated cloud id'],
- ['user@server', true, true, 'token', false, true, 'invalid token'],
- ['user@server', true, true, 'token', false, false, 'invalid token'],
- ['user@server', true, true, 'token', true, false, 'can not create share'],
- ['user@server', false, true, 'token', true, true, 'This server doesn\'t support outgoing federated shares'],
+ ['user@server', true, true, 'token', true, true, 'server', 31],
+ ['user@server', true, true, 'token', false, false, 'server', 4],
+ ['user@server', true, false, 'token', true, true, 'invalid federated cloud id', 31],
+ ['user@server', true, false, 'token', false, true, 'invalid federated cloud id', 31],
+ ['user@server', true, false, 'token', false, false, 'invalid federated cloud id', 31],
+ ['user@server', true, false, 'token', true, false, 'invalid federated cloud id', 31],
+ ['user@server', true, true, 'token', false, true, 'invalid token', 31],
+ ['user@server', true, true, 'token', false, false, 'invalid token', 31],
+ ['user@server', true, true, 'token', true, false, 'can not create share', 31],
+ ['user@server', false, true, 'token', true, true, 'This server doesn\'t support outgoing federated shares', 31],
];
}
}