summaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/CapabilitiesContext.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-12-11 15:28:21 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-11 16:25:35 +0100
commit671b06a86b8c7ffae0e29e20913c44e22be027fb (patch)
tree189fb917ae6aff99a1d5054b062a6fc08733c5a4 /build/integration/features/bootstrap/CapabilitiesContext.php
parent1959171d5dadde8b5eb7e199d2b9dd1db1a48aac (diff)
downloadnextcloud-server-671b06a86b8c7ffae0e29e20913c44e22be027fb.tar.gz
nextcloud-server-671b06a86b8c7ffae0e29e20913c44e22be027fb.zip
Deduplicate the array
Diffstat (limited to 'build/integration/features/bootstrap/CapabilitiesContext.php')
-rw-r--r--build/integration/features/bootstrap/CapabilitiesContext.php35
1 files changed, 15 insertions, 20 deletions
diff --git a/build/integration/features/bootstrap/CapabilitiesContext.php b/build/integration/features/bootstrap/CapabilitiesContext.php
index 14fbf1ebc0f..d30984f0db7 100644
--- a/build/integration/features/bootstrap/CapabilitiesContext.php
+++ b/build/integration/features/bootstrap/CapabilitiesContext.php
@@ -53,6 +53,19 @@ class CapabilitiesContext implements Context, SnippetAcceptingContext {
}
}
+ protected function resetAppConfigs() {
+ $this->modifyServerConfig('core', 'shareapi_enabled', 'yes');
+ $this->modifyServerConfig('core', 'shareapi_allow_links', 'yes');
+ $this->modifyServerConfig('core', 'shareapi_allow_public_upload', 'yes');
+ $this->modifyServerConfig('core', 'shareapi_allow_resharing', 'yes');
+ $this->modifyServerConfig('files_sharing', 'outgoing_server2server_share_enabled', 'yes');
+ $this->modifyServerConfig('files_sharing', 'incoming_server2server_share_enabled', 'yes');
+ $this->modifyServerConfig('core', 'shareapi_enforce_links_password', 'no');
+ $this->modifyServerConfig('core', 'shareapi_allow_public_notification', 'no');
+ $this->modifyServerConfig('core', 'shareapi_default_expire_date', 'no');
+ $this->modifyServerConfig('core', 'shareapi_enforce_expire_date', 'no');
+ }
+
/**
* @BeforeScenario
*
@@ -69,16 +82,7 @@ class CapabilitiesContext implements Context, SnippetAcceptingContext {
$this->setStatusTestingApp(true);
}
- $this->modifyServerConfig('core', 'shareapi_enabled', 'yes');
- $this->modifyServerConfig('core', 'shareapi_allow_links', 'yes');
- $this->modifyServerConfig('core', 'shareapi_allow_public_upload', 'yes');
- $this->modifyServerConfig('core', 'shareapi_allow_resharing', 'yes');
- $this->modifyServerConfig('files_sharing', 'outgoing_server2server_share_enabled', 'yes');
- $this->modifyServerConfig('files_sharing', 'incoming_server2server_share_enabled', 'yes');
- $this->modifyServerConfig('core', 'shareapi_enforce_links_password', 'no');
- $this->modifyServerConfig('core', 'shareapi_allow_public_notification', 'no');
- $this->modifyServerConfig('core', 'shareapi_default_expire_date', 'no');
- $this->modifyServerConfig('core', 'shareapi_enforce_expire_date', 'no');
+ $this->resetAppConfigs();
$this->currentUser = $user;
}
@@ -95,16 +99,7 @@ class CapabilitiesContext implements Context, SnippetAcceptingContext {
$user = $this->currentUser;
$this->currentUser = 'admin';
- $this->modifyServerConfig('core', 'shareapi_enabled', 'yes');
- $this->modifyServerConfig('core', 'shareapi_allow_links', 'yes');
- $this->modifyServerConfig('core', 'shareapi_allow_public_upload', 'yes');
- $this->modifyServerConfig('core', 'shareapi_allow_resharing', 'yes');
- $this->modifyServerConfig('files_sharing', 'outgoing_server2server_share_enabled', 'yes');
- $this->modifyServerConfig('files_sharing', 'incoming_server2server_share_enabled', 'yes');
- $this->modifyServerConfig('core', 'shareapi_enforce_links_password', 'no');
- $this->modifyServerConfig('core', 'shareapi_allow_public_notification', 'no');
- $this->modifyServerConfig('core', 'shareapi_default_expire_date', 'no');
- $this->modifyServerConfig('core', 'shareapi_enforce_expire_date', 'no');
+ $this->resetAppConfigs();
$this->setStatusTestingApp(false);
$this->currentUser = $user;