adjust tests to latest changes

This commit is contained in:
Arthur Schiwon 2016-08-16 18:59:45 +02:00
parent 717e22267a
commit 4943441bde
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
2 changed files with 118 additions and 20 deletions

View File

@ -71,6 +71,10 @@ class EncryptionTest extends TestCase {
->expects($this->once()) ->expects($this->once())
->method('isReady') ->method('isReady')
->willReturn($enabled); ->willReturn($enabled);
$this->manager
->expects($this->once())
->method('getEncryptionModules')
->willReturn([]);
$this->userManager $this->userManager
->expects($this->once()) ->expects($this->once())
->method('getBackends') ->method('getBackends')
@ -82,6 +86,7 @@ class EncryptionTest extends TestCase {
'encryptionEnabled' => $enabled, 'encryptionEnabled' => $enabled,
'encryptionReady' => $enabled, 'encryptionReady' => $enabled,
'externalBackendsEnabled' => false, 'externalBackendsEnabled' => false,
'encryptionModules' => []
], ],
'' ''
); );
@ -101,6 +106,10 @@ class EncryptionTest extends TestCase {
->expects($this->once()) ->expects($this->once())
->method('isReady') ->method('isReady')
->willReturn($enabled); ->willReturn($enabled);
$this->manager
->expects($this->once())
->method('getEncryptionModules')
->willReturn([]);
$this->userManager $this->userManager
->expects($this->once()) ->expects($this->once())
->method('getBackends') ->method('getBackends')
@ -112,6 +121,7 @@ class EncryptionTest extends TestCase {
'encryptionEnabled' => $enabled, 'encryptionEnabled' => $enabled,
'encryptionReady' => $enabled, 'encryptionReady' => $enabled,
'externalBackendsEnabled' => true, 'externalBackendsEnabled' => true,
'encryptionModules' => []
], ],
'' ''
); );

View File

@ -52,25 +52,60 @@ class SharingTest extends TestCase {
$this->config $this->config
->expects($this->at(1)) ->expects($this->at(1))
->method('getAppValue') ->method('getAppValue')
->with('core', 'shareapi_enabled', 'yes') ->with('core', 'shareapi_allow_group_sharing', 'yes')
->willReturn('yes'); ->willReturn('yes');
$this->config $this->config
->expects($this->at(2)) ->expects($this->at(2))
->method('getAppValue') ->method('getAppValue')
->with('core', 'shareapi_allow_links', 'yes')
->willReturn('yes');
$this->config
->expects($this->at(3))
->method('getAppValue')
->with('core', 'shareapi_allow_mail_notification', 'no')
->willReturn('no');
$this->config
->expects($this->at(4))
->method('getAppValue')
->with('core', 'shareapi_allow_public_notification', 'no')
->willReturn('no');
$this->config
->expects($this->at(5))
->method('getAppValue')
->with('core', 'shareapi_allow_public_upload', 'yes')
->willReturn('yes');
$this->config
->expects($this->at(6))
->method('getAppValue')
->with('core', 'shareapi_allow_resharing', 'yes')
->willReturn('yes');
$this->config
->expects($this->at(7))
->method('getAppValue')
->with('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes')
->willReturn('yes');
$this->config
->expects($this->at(8))
->method('getAppValue')
->with('core', 'shareapi_enabled', 'yes')
->willReturn('yes');
$this->config
->expects($this->at(9))
->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(3)) ->expects($this->at(10))
->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(4)) ->expects($this->at(11))
->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(5)) ->expects($this->at(12))
->method('getAppValue') ->method('getAppValue')
->with('core', 'shareapi_exclude_groups', 'no') ->with('core', 'shareapi_exclude_groups', 'no')
->willReturn('no'); ->willReturn('no');
@ -79,12 +114,21 @@ class SharingTest extends TestCase {
'settings', 'settings',
'admin/sharing', 'admin/sharing',
[ [
'shareAPIEnabled' => 'yes', 'allowGroupSharing' => 'yes',
'shareDefaultExpireDateSet' => 'no', 'allowLinks' => 'yes',
'shareExpireAfterNDays' => '7', 'allowMailNotification' => 'no',
'shareEnforceExpireDate' => 'no', 'allowPublicMailNotification' => 'no',
'shareExcludeGroups' => false, 'allowPublicUpload' => 'yes',
'shareExcludedGroupsList' => '', 'allowResharing' => 'yes',
'allowShareDialogUserEnumeration' => 'yes',
'enforceLinkPassword' => false,
'onlyShareWithGroupMembers' => false,
'shareAPIEnabled' => 'yes',
'shareDefaultExpireDateSet' => 'no',
'shareExpireAfterNDays' => '7',
'shareEnforceExpireDate' => 'no',
'shareExcludeGroups' => false,
'shareExcludedGroupsList' => '',
], ],
'' ''
); );
@ -101,25 +145,60 @@ class SharingTest extends TestCase {
$this->config $this->config
->expects($this->at(1)) ->expects($this->at(1))
->method('getAppValue') ->method('getAppValue')
->with('core', 'shareapi_enabled', 'yes') ->with('core', 'shareapi_allow_group_sharing', 'yes')
->willReturn('yes'); ->willReturn('yes');
$this->config $this->config
->expects($this->at(2)) ->expects($this->at(2))
->method('getAppValue') ->method('getAppValue')
->with('core', 'shareapi_allow_links', 'yes')
->willReturn('yes');
$this->config
->expects($this->at(3))
->method('getAppValue')
->with('core', 'shareapi_allow_mail_notification', 'no')
->willReturn('no');
$this->config
->expects($this->at(4))
->method('getAppValue')
->with('core', 'shareapi_allow_public_notification', 'no')
->willReturn('no');
$this->config
->expects($this->at(5))
->method('getAppValue')
->with('core', 'shareapi_allow_public_upload', 'yes')
->willReturn('yes');
$this->config
->expects($this->at(6))
->method('getAppValue')
->with('core', 'shareapi_allow_resharing', 'yes')
->willReturn('yes');
$this->config
->expects($this->at(7))
->method('getAppValue')
->with('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes')
->willReturn('yes');
$this->config
->expects($this->at(8))
->method('getAppValue')
->with('core', 'shareapi_enabled', 'yes')
->willReturn('yes');
$this->config
->expects($this->at(9))
->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(3)) ->expects($this->at(10))
->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(4)) ->expects($this->at(11))
->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(5)) ->expects($this->at(12))
->method('getAppValue') ->method('getAppValue')
->with('core', 'shareapi_exclude_groups', 'no') ->with('core', 'shareapi_exclude_groups', 'no')
->willReturn('yes'); ->willReturn('yes');
@ -128,12 +207,21 @@ class SharingTest extends TestCase {
'settings', 'settings',
'admin/sharing', 'admin/sharing',
[ [
'shareAPIEnabled' => 'yes', 'allowGroupSharing' => 'yes',
'shareDefaultExpireDateSet' => 'no', 'allowLinks' => 'yes',
'shareExpireAfterNDays' => '7', 'allowMailNotification' => 'no',
'shareEnforceExpireDate' => 'no', 'allowPublicMailNotification' => 'no',
'shareExcludeGroups' => true, 'allowPublicUpload' => 'yes',
'shareExcludedGroupsList' => 'NoSharers|OtherNoSharers', 'allowResharing' => 'yes',
'allowShareDialogUserEnumeration' => 'yes',
'enforceLinkPassword' => false,
'onlyShareWithGroupMembers' => false,
'shareAPIEnabled' => 'yes',
'shareDefaultExpireDateSet' => 'no',
'shareExpireAfterNDays' => '7',
'shareEnforceExpireDate' => 'no',
'shareExcludeGroups' => true,
'shareExcludedGroupsList' => 'NoSharers|OtherNoSharers',
], ],
'' ''
); );