mirror of
https://github.com/nextcloud/server.git
synced 2026-03-04 18:28:08 +01:00
Fix tests for apps/settings new section
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
@@ -124,44 +124,46 @@ class SharingTest extends TestCase {
|
||||
|
||||
$this->appManager->method('isEnabledForUser')->with('files_sharing')->willReturn(false);
|
||||
$this->initialState
|
||||
->expect($this->once())
|
||||
->expects($this->exactly(3))
|
||||
->method('provideInitialState')
|
||||
->with(
|
||||
'sharingSettings',
|
||||
->withConsecutive(
|
||||
['sharingAppEnabled', false],
|
||||
['sharingDocumentation', ''],
|
||||
[
|
||||
'sharingAppEnabled' => false,
|
||||
'allowGroupSharing' => 'yes',
|
||||
'allowLinks' => 'yes',
|
||||
'allowPublicUpload' => 'yes',
|
||||
'allowResharing' => 'yes',
|
||||
'allowShareDialogUserEnumeration' => 'yes',
|
||||
'restrictUserEnumerationToGroup' => 'no',
|
||||
'restrictUserEnumerationToPhone' => 'no',
|
||||
'restrictUserEnumerationFullMatch' => 'yes',
|
||||
'restrictUserEnumerationFullMatchUserId' => 'yes',
|
||||
'restrictUserEnumerationFullMatchEmail' => 'yes',
|
||||
'restrictUserEnumerationFullMatchIgnoreSecondDN' => 'no',
|
||||
'enforceLinkPassword' => false,
|
||||
'onlyShareWithGroupMembers' => false,
|
||||
'shareAPIEnabled' => 'yes',
|
||||
'shareDefaultExpireDateSet' => 'no',
|
||||
'shareExpireAfterNDays' => '7',
|
||||
'shareEnforceExpireDate' => 'no',
|
||||
'shareExcludeGroups' => false,
|
||||
'shareExcludedGroupsList' => '',
|
||||
'publicShareDisclaimerText' => 'Lorem ipsum',
|
||||
'enableLinkPasswordByDefault' => 'yes',
|
||||
'shareApiDefaultPermissions' => Constants::PERMISSION_ALL,
|
||||
'shareApiDefaultPermissionsCheckboxes' => self::invokePrivate($this->admin, 'getSharePermissionList', []),
|
||||
'shareDefaultInternalExpireDateSet' => 'no',
|
||||
'shareInternalExpireAfterNDays' => '7',
|
||||
'shareInternalEnforceExpireDate' => 'no',
|
||||
'shareDefaultRemoteExpireDateSet' => 'no',
|
||||
'shareRemoteExpireAfterNDays' => '7',
|
||||
'shareRemoteEnforceExpireDate' => 'no',
|
||||
'allowLinksExcludeGroups' => '',
|
||||
'passwordExcludedGroups' => '',
|
||||
'passwordExcludedGroupsFeatureEnabled' => false,
|
||||
'sharingSettings',
|
||||
[
|
||||
'allowGroupSharing' => true,
|
||||
'allowLinks' => true,
|
||||
'allowPublicUpload' => true,
|
||||
'allowResharing' => true,
|
||||
'allowShareDialogUserEnumeration' => true,
|
||||
'restrictUserEnumerationToGroup' => false,
|
||||
'restrictUserEnumerationToPhone' => false,
|
||||
'restrictUserEnumerationFullMatch' => true,
|
||||
'restrictUserEnumerationFullMatchUserId' => true,
|
||||
'restrictUserEnumerationFullMatchEmail' => true,
|
||||
'restrictUserEnumerationFullMatchIgnoreSecondDN' => false,
|
||||
'enforceLinksPassword' => false,
|
||||
'onlyShareWithGroupMembers' => false,
|
||||
'enabled' => true,
|
||||
'defaultExpireDate' => false,
|
||||
'expireAfterNDays' => '7',
|
||||
'enforceExpireDate' => false,
|
||||
'excludeGroups' => false,
|
||||
'excludeGroupsList' => [],
|
||||
'publicShareDisclaimerText' => 'Lorem ipsum',
|
||||
'enableLinkPasswordByDefault' => true,
|
||||
'defaultPermissions' => Constants::PERMISSION_ALL,
|
||||
'defaultInternalExpireDate' => false,
|
||||
'internalExpireAfterNDays' => '7',
|
||||
'enforceInternalExpireDate' => false,
|
||||
'defaultRemoteExpireDate' => false,
|
||||
'remoteExpireAfterNDays' => '7',
|
||||
'enforceRemoteExpireDate' => false,
|
||||
'allowLinksExcludeGroups' => [],
|
||||
'passwordExcludedGroups' => [],
|
||||
'passwordExcludedGroupsFeatureEnabled' => false,
|
||||
]
|
||||
],
|
||||
);
|
||||
|
||||
@@ -213,44 +215,46 @@ class SharingTest extends TestCase {
|
||||
|
||||
$this->appManager->method('isEnabledForUser')->with('files_sharing')->willReturn(true);
|
||||
$this->initialState
|
||||
->expect($this->once())
|
||||
->expects($this->exactly(3))
|
||||
->method('provideInitialState')
|
||||
->with(
|
||||
'sharingSettings',
|
||||
->withConsecutive(
|
||||
['sharingAppEnabled', true],
|
||||
['sharingDocumentation', ''],
|
||||
[
|
||||
'sharingAppEnabled' => true,
|
||||
'allowGroupSharing' => 'yes',
|
||||
'allowLinks' => 'yes',
|
||||
'allowPublicUpload' => 'yes',
|
||||
'allowResharing' => 'yes',
|
||||
'allowShareDialogUserEnumeration' => 'yes',
|
||||
'restrictUserEnumerationToGroup' => 'no',
|
||||
'restrictUserEnumerationToPhone' => 'no',
|
||||
'restrictUserEnumerationFullMatch' => 'yes',
|
||||
'restrictUserEnumerationFullMatchUserId' => 'yes',
|
||||
'restrictUserEnumerationFullMatchEmail' => 'yes',
|
||||
'restrictUserEnumerationFullMatchIgnoreSecondDN' => 'no',
|
||||
'enforceLinkPassword' => false,
|
||||
'onlyShareWithGroupMembers' => false,
|
||||
'shareAPIEnabled' => 'yes',
|
||||
'shareDefaultExpireDateSet' => 'no',
|
||||
'shareExpireAfterNDays' => '7',
|
||||
'shareEnforceExpireDate' => 'no',
|
||||
'shareExcludeGroups' => true,
|
||||
'shareExcludedGroupsList' => 'NoSharers|OtherNoSharers',
|
||||
'publicShareDisclaimerText' => 'Lorem ipsum',
|
||||
'enableLinkPasswordByDefault' => 'yes',
|
||||
'shareApiDefaultPermissions' => Constants::PERMISSION_ALL,
|
||||
'shareApiDefaultPermissionsCheckboxes' => self::invokePrivate($this->admin, 'getSharePermissionList', []),
|
||||
'shareDefaultInternalExpireDateSet' => 'no',
|
||||
'shareInternalExpireAfterNDays' => '7',
|
||||
'shareInternalEnforceExpireDate' => 'no',
|
||||
'shareDefaultRemoteExpireDateSet' => 'no',
|
||||
'shareRemoteExpireAfterNDays' => '7',
|
||||
'shareRemoteEnforceExpireDate' => 'no',
|
||||
'allowLinksExcludeGroups' => '',
|
||||
'passwordExcludedGroups' => '',
|
||||
'passwordExcludedGroupsFeatureEnabled' => false,
|
||||
'sharingSettings',
|
||||
[
|
||||
'allowGroupSharing' => true,
|
||||
'allowLinks' => true,
|
||||
'allowPublicUpload' => true,
|
||||
'allowResharing' => true,
|
||||
'allowShareDialogUserEnumeration' => true,
|
||||
'restrictUserEnumerationToGroup' => false,
|
||||
'restrictUserEnumerationToPhone' => false,
|
||||
'restrictUserEnumerationFullMatch' => true,
|
||||
'restrictUserEnumerationFullMatchUserId' => true,
|
||||
'restrictUserEnumerationFullMatchEmail' => true,
|
||||
'restrictUserEnumerationFullMatchIgnoreSecondDN' => false,
|
||||
'enforceLinksPassword' => false,
|
||||
'onlyShareWithGroupMembers' => false,
|
||||
'enabled' => true,
|
||||
'defaultExpireDate' => false,
|
||||
'expireAfterNDays' => '7',
|
||||
'enforceExpireDate' => false,
|
||||
'excludeGroups' => true,
|
||||
'excludeGroupsList' => ['NoSharers','OtherNoSharers'],
|
||||
'publicShareDisclaimerText' => 'Lorem ipsum',
|
||||
'enableLinkPasswordByDefault' => true,
|
||||
'defaultPermissions' => Constants::PERMISSION_ALL,
|
||||
'defaultInternalExpireDate' => false,
|
||||
'internalExpireAfterNDays' => '7',
|
||||
'enforceInternalExpireDate' => false,
|
||||
'defaultRemoteExpireDate' => false,
|
||||
'remoteExpireAfterNDays' => '7',
|
||||
'enforceRemoteExpireDate' => false,
|
||||
'allowLinksExcludeGroups' => [],
|
||||
'passwordExcludedGroups' => [],
|
||||
'passwordExcludedGroupsFeatureEnabled' => false,
|
||||
]
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user