Fix tests due to config adjustments
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
ae4dc3467c
commit
47271e56ee
|
@ -431,10 +431,9 @@ class PrincipalTest extends TestCase {
|
||||||
->will($this->returnValue($sharingEnabled));
|
->will($this->returnValue($sharingEnabled));
|
||||||
|
|
||||||
if ($sharingEnabled) {
|
if ($sharingEnabled) {
|
||||||
$this->config->expects($this->once())
|
$this->shareManager->expects($this->once())
|
||||||
->method('getAppValue')
|
->method('allowEnumeration')
|
||||||
->with('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes')
|
->willReturn(true);
|
||||||
->willReturn('yes');
|
|
||||||
|
|
||||||
$this->shareManager->expects($this->once())
|
$this->shareManager->expects($this->once())
|
||||||
->method('shareWithGroupMembersOnly')
|
->method('shareWithGroupMembersOnly')
|
||||||
|
@ -526,10 +525,9 @@ class PrincipalTest extends TestCase {
|
||||||
->method('shareAPIEnabled')
|
->method('shareAPIEnabled')
|
||||||
->will($this->returnValue(true));
|
->will($this->returnValue(true));
|
||||||
|
|
||||||
$this->config->expects($this->exactly(2))
|
$this->shareManager->expects($this->exactly(2))
|
||||||
->method('getAppValue')
|
->method('allowEnumeration')
|
||||||
->with('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes')
|
->willReturn(true);
|
||||||
->willReturn('yes');
|
|
||||||
|
|
||||||
$this->shareManager->expects($this->exactly(2))
|
$this->shareManager->expects($this->exactly(2))
|
||||||
->method('shareWithGroupMembersOnly')
|
->method('shareWithGroupMembersOnly')
|
||||||
|
@ -557,10 +555,9 @@ class PrincipalTest extends TestCase {
|
||||||
->method('shareAPIEnabled')
|
->method('shareAPIEnabled')
|
||||||
->will($this->returnValue(true));
|
->will($this->returnValue(true));
|
||||||
|
|
||||||
$this->config->expects($this->once())
|
$this->shareManager->expects($this->once())
|
||||||
->method('getAppValue')
|
->method('allowEnumeration')
|
||||||
->with('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes')
|
->willReturn(false);
|
||||||
->willReturn('no');
|
|
||||||
|
|
||||||
$this->shareManager->expects($this->once())
|
$this->shareManager->expects($this->once())
|
||||||
->method('shareWithGroupMembersOnly')
|
->method('shareWithGroupMembersOnly')
|
||||||
|
@ -593,10 +590,9 @@ class PrincipalTest extends TestCase {
|
||||||
->method('shareAPIEnabled')
|
->method('shareAPIEnabled')
|
||||||
->will($this->returnValue(true));
|
->will($this->returnValue(true));
|
||||||
|
|
||||||
$this->config->expects($this->once())
|
$this->shareManager->expects($this->once())
|
||||||
->method('getAppValue')
|
->method('allowEnumeration')
|
||||||
->with('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes')
|
->willReturn(false);
|
||||||
->willReturn('no');
|
|
||||||
|
|
||||||
$this->shareManager->expects($this->once())
|
$this->shareManager->expects($this->once())
|
||||||
->method('shareWithGroupMembersOnly')
|
->method('shareWithGroupMembersOnly')
|
||||||
|
|
|
@ -94,55 +94,60 @@ class SharingTest extends TestCase {
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(6))
|
->expects($this->at(6))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
|
->with('core', 'shareapi_restrict_user_enumeration_to_group', 'no')
|
||||||
|
->willReturn('no');
|
||||||
|
$this->config
|
||||||
|
->expects($this->at(7))
|
||||||
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_enabled', 'yes')
|
->with('core', 'shareapi_enabled', 'yes')
|
||||||
->willReturn('yes');
|
->willReturn('yes');
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(7))
|
->expects($this->at(8))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_default_expire_date', 'no')
|
->with('core', 'shareapi_default_expire_date', 'no')
|
||||||
->willReturn('no');
|
->willReturn('no');
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(8))
|
->expects($this->at(9))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_expire_after_n_days', '7')
|
->with('core', 'shareapi_expire_after_n_days', '7')
|
||||||
->willReturn('7');
|
->willReturn('7');
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(9))
|
->expects($this->at(10))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_enforce_expire_date', 'no')
|
->with('core', 'shareapi_enforce_expire_date', 'no')
|
||||||
->willReturn('no');
|
->willReturn('no');
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(10))
|
->expects($this->at(11))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_exclude_groups', 'no')
|
->with('core', 'shareapi_exclude_groups', 'no')
|
||||||
->willReturn('no');
|
->willReturn('no');
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(11))
|
->expects($this->at(12))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_public_link_disclaimertext', null)
|
->with('core', 'shareapi_public_link_disclaimertext', null)
|
||||||
->willReturn('Lorem ipsum');
|
->willReturn('Lorem ipsum');
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(12))
|
->expects($this->at(13))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_enable_link_password_by_default', 'no')
|
->with('core', 'shareapi_enable_link_password_by_default', 'no')
|
||||||
->willReturn('yes');
|
->willReturn('yes');
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(13))
|
->expects($this->at(14))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_default_permissions', Constants::PERMISSION_ALL)
|
->with('core', 'shareapi_default_permissions', Constants::PERMISSION_ALL)
|
||||||
->willReturn(Constants::PERMISSION_ALL);
|
->willReturn(Constants::PERMISSION_ALL);
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(14))
|
->expects($this->at(15))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_default_internal_expire_date', 'no')
|
->with('core', 'shareapi_default_internal_expire_date', 'no')
|
||||||
->willReturn('no');
|
->willReturn('no');
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(15))
|
->expects($this->at(16))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_internal_expire_after_n_days', '7')
|
->with('core', 'shareapi_internal_expire_after_n_days', '7')
|
||||||
->willReturn('7');
|
->willReturn('7');
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(16))
|
->expects($this->at(17))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_enforce_internal_expire_date', 'no')
|
->with('core', 'shareapi_enforce_internal_expire_date', 'no')
|
||||||
->willReturn('no');
|
->willReturn('no');
|
||||||
|
@ -156,6 +161,7 @@ class SharingTest extends TestCase {
|
||||||
'allowPublicUpload' => 'yes',
|
'allowPublicUpload' => 'yes',
|
||||||
'allowResharing' => 'yes',
|
'allowResharing' => 'yes',
|
||||||
'allowShareDialogUserEnumeration' => 'yes',
|
'allowShareDialogUserEnumeration' => 'yes',
|
||||||
|
'restrictUserEnumerationToGroup' => 'no',
|
||||||
'enforceLinkPassword' => false,
|
'enforceLinkPassword' => false,
|
||||||
'onlyShareWithGroupMembers' => false,
|
'onlyShareWithGroupMembers' => false,
|
||||||
'shareAPIEnabled' => 'yes',
|
'shareAPIEnabled' => 'yes',
|
||||||
|
@ -212,55 +218,60 @@ class SharingTest extends TestCase {
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(6))
|
->expects($this->at(6))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
|
->with('core', 'shareapi_restrict_user_enumeration_to_group', 'no')
|
||||||
|
->willReturn('no');
|
||||||
|
$this->config
|
||||||
|
->expects($this->at(7))
|
||||||
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_enabled', 'yes')
|
->with('core', 'shareapi_enabled', 'yes')
|
||||||
->willReturn('yes');
|
->willReturn('yes');
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(7))
|
->expects($this->at(8))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_default_expire_date', 'no')
|
->with('core', 'shareapi_default_expire_date', 'no')
|
||||||
->willReturn('no');
|
->willReturn('no');
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(8))
|
->expects($this->at(9))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_expire_after_n_days', '7')
|
->with('core', 'shareapi_expire_after_n_days', '7')
|
||||||
->willReturn('7');
|
->willReturn('7');
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(9))
|
->expects($this->at(10))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_enforce_expire_date', 'no')
|
->with('core', 'shareapi_enforce_expire_date', 'no')
|
||||||
->willReturn('no');
|
->willReturn('no');
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(10))
|
->expects($this->at(11))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_exclude_groups', 'no')
|
->with('core', 'shareapi_exclude_groups', 'no')
|
||||||
->willReturn('yes');
|
->willReturn('yes');
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(11))
|
->expects($this->at(12))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_public_link_disclaimertext', null)
|
->with('core', 'shareapi_public_link_disclaimertext', null)
|
||||||
->willReturn('Lorem ipsum');
|
->willReturn('Lorem ipsum');
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(12))
|
->expects($this->at(13))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_enable_link_password_by_default', 'no')
|
->with('core', 'shareapi_enable_link_password_by_default', 'no')
|
||||||
->willReturn('yes');
|
->willReturn('yes');
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(13))
|
->expects($this->at(14))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_default_permissions', Constants::PERMISSION_ALL)
|
->with('core', 'shareapi_default_permissions', Constants::PERMISSION_ALL)
|
||||||
->willReturn(Constants::PERMISSION_ALL);
|
->willReturn(Constants::PERMISSION_ALL);
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(14))
|
->expects($this->at(15))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_default_internal_expire_date', 'no')
|
->with('core', 'shareapi_default_internal_expire_date', 'no')
|
||||||
->willReturn('no');
|
->willReturn('no');
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(15))
|
->expects($this->at(16))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_internal_expire_after_n_days', '7')
|
->with('core', 'shareapi_internal_expire_after_n_days', '7')
|
||||||
->willReturn('7');
|
->willReturn('7');
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(16))
|
->expects($this->at(17))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'shareapi_enforce_internal_expire_date', 'no')
|
->with('core', 'shareapi_enforce_internal_expire_date', 'no')
|
||||||
->willReturn('no');
|
->willReturn('no');
|
||||||
|
@ -275,6 +286,7 @@ class SharingTest extends TestCase {
|
||||||
'allowPublicUpload' => 'yes',
|
'allowPublicUpload' => 'yes',
|
||||||
'allowResharing' => 'yes',
|
'allowResharing' => 'yes',
|
||||||
'allowShareDialogUserEnumeration' => 'yes',
|
'allowShareDialogUserEnumeration' => 'yes',
|
||||||
|
'restrictUserEnumerationToGroup' => 'no',
|
||||||
'enforceLinkPassword' => false,
|
'enforceLinkPassword' => false,
|
||||||
'onlyShareWithGroupMembers' => false,
|
'onlyShareWithGroupMembers' => false,
|
||||||
'shareAPIEnabled' => 'yes',
|
'shareAPIEnabled' => 'yes',
|
||||||
|
|
Loading…
Reference in New Issue