Skip to content
Snippets Groups Projects
Commit 2c8288d8 authored by Björn Schießle's avatar Björn Schießle Committed by Thomas Müller
Browse files

get the storage from the view

parent 0a417b11
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment