summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/tests/webdav.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-06-04 10:26:02 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-06-04 10:26:02 +0200
commit4ab77f90d2645f503f077903020c6bd56415294a (patch)
tree621250352a8da7db1112f08b1bcaf7b4b3676b0e /apps/files_encryption/tests/webdav.php
parent9e31118675d425b99eff340ec7517e478ebc9fcf (diff)
parent917f389747dc3b8b3d5b9ff326a2cee21579f58a (diff)
downloadnextcloud-server-4ab77f90d2645f503f077903020c6bd56415294a.tar.gz
nextcloud-server-4ab77f90d2645f503f077903020c6bd56415294a.zip
Merge pull request #8662 from owncloud/f-lock
f-lock
Diffstat (limited to 'apps/files_encryption/tests/webdav.php')
-rwxr-xr-xapps/files_encryption/tests/webdav.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/files_encryption/tests/webdav.php b/apps/files_encryption/tests/webdav.php
index d33dc58cf92..f299116ff23 100755
--- a/apps/files_encryption/tests/webdav.php
+++ b/apps/files_encryption/tests/webdav.php
@@ -49,7 +49,7 @@ class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase {
public $dataShort;
public $stateFilesTrashbin;
- private static $storage;
+ private $storage;
public static function setUpBeforeClass() {
// reset backend
@@ -69,7 +69,6 @@ class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase {
// create test user
\Test_Encryption_Util::loginHelper(\Test_Encryption_Webdav::TEST_ENCRYPTION_WEBDAV_USER1, true);
- self::$storage = new \OC\Files\Storage\Temporary(array());
}
function setUp() {
@@ -83,7 +82,7 @@ class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase {
// init filesystem view
$this->view = new \OC\Files\View('/');
-
+ list($this->storage, $intPath) = $this->view->resolvePath('/');
// init short data
$this->dataShort = 'hats';
@@ -200,6 +199,9 @@ class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase {
$_SERVER['HTTP_AUTHORIZATION'] = 'Basic dGVzdC13ZWJkYXYtdXNlcjE6dGVzdC13ZWJkYXYtdXNlcjE=';
$_SERVER['PATH_INFO'] = '/webdav' . $filename;
+ // at the beginning the file should exist
+ $this->assertTrue($this->view->file_exists('/' . $this->userId . '/files' . $filename));
+
// handle webdav request
$content = $this->handleWebdavRequest();
@@ -230,7 +232,6 @@ class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase {
// Create ownCloud Dir
$root = '/' . $this->userId . '/files';
- \OC\Files\Filesystem::mount(self::$storage, array(), $root);
$view = new \OC\Files\View($root);
$publicDir = new OC_Connector_Sabre_Directory($view, $view->getFileInfo(''));
$objectTree = new \OC\Connector\Sabre\ObjectTree();