You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

webdav.php 962B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Copyright (c) 2012 Robin Appelman <icewind@owncloud.com>
  4. * This file is licensed under the Affero General Public License version 3 or
  5. * later.
  6. * See the COPYING-README file.
  7. */
  8. namespace Test\Files\Storage;
  9. class DAV extends Storage {
  10. private $config;
  11. public function setUp() {
  12. $id = uniqid();
  13. $this->config = include('files_external/tests/config.php');
  14. if ( ! is_array($this->config) or ! isset($this->config['webdav']) or ! $this->config['webdav']['run']) {
  15. $this->markTestSkipped('WebDAV backend not configured');
  16. }
  17. if (isset($this->config['webdav']['wait'])) {
  18. $this->waitDelay = $this->config['webdav']['wait'];
  19. }
  20. $this->config['webdav']['root'] .= '/' . $id; //make sure we have an new empty folder to work in
  21. $this->instance = new \OC\Files\Storage\DAV($this->config['webdav']);
  22. $this->instance->mkdir('/');
  23. }
  24. public function tearDown() {
  25. if ($this->instance) {
  26. $this->instance->rmdir('/');
  27. }
  28. }
  29. }