SharingContext.php 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. use Behat\Behat\Context\Context;
  7. use Behat\Behat\Context\SnippetAcceptingContext;
  8. require __DIR__ . '/../../vendor/autoload.php';
  9. /**
  10. * Features context.
  11. */
  12. class SharingContext implements Context, SnippetAcceptingContext {
  13. use WebDav;
  14. use Trashbin;
  15. use AppConfiguration;
  16. use CommandLine;
  17. protected function resetAppConfigs() {
  18. $this->deleteServerConfig('core', 'shareapi_default_permissions');
  19. $this->deleteServerConfig('core', 'shareapi_default_internal_expire_date');
  20. $this->deleteServerConfig('core', 'shareapi_internal_expire_after_n_days');
  21. $this->deleteServerConfig('core', 'internal_defaultExpDays');
  22. $this->deleteServerConfig('core', 'shareapi_enforce_links_password');
  23. $this->deleteServerConfig('core', 'shareapi_default_expire_date');
  24. $this->deleteServerConfig('core', 'shareapi_expire_after_n_days');
  25. $this->deleteServerConfig('core', 'link_defaultExpDays');
  26. $this->runOcc(['config:system:delete', 'share_folder']);
  27. }
  28. }