aboutsummaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/SharingContext.php
blob: fe4d3bb6bf149dac944cbb00e45112d2a29dfd13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php

/**
 * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
use Behat\Behat\Context\Context;
use Behat\Behat\Context\SnippetAcceptingContext;

require __DIR__ . '/../../vendor/autoload.php';


/**
 * Features context.
 */
class SharingContext implements Context, SnippetAcceptingContext {
	use WebDav;
	use Trashbin;
	use AppConfiguration;
	use CommandLine;
	use Activity;

	protected function resetAppConfigs() {
		$this->deleteServerConfig('core', 'shareapi_default_permissions');
		$this->deleteServerConfig('core', 'shareapi_default_internal_expire_date');
		$this->deleteServerConfig('core', 'shareapi_internal_expire_after_n_days');
		$this->deleteServerConfig('core', 'internal_defaultExpDays');
		$this->deleteServerConfig('core', 'shareapi_enforce_links_password');
		$this->deleteServerConfig('core', 'shareapi_default_expire_date');
		$this->deleteServerConfig('core', 'shareapi_expire_after_n_days');
		$this->deleteServerConfig('core', 'link_defaultExpDays');
		$this->deleteServerConfig('files_sharing', 'outgoing_server2server_share_enabled');
		$this->deleteServerConfig('core', 'shareapi_allow_view_without_download');

		$this->runOcc(['config:system:delete', 'share_folder']);
	}
}