2015-09-08 16:35:30 +03:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Copyright (c) 2015 Robin Appelman <icewind@owncloud.com>
|
|
|
|
* This file is licensed under the Affero General Public License version 3 or
|
|
|
|
* later.
|
|
|
|
* See the COPYING-README file.
|
|
|
|
*/
|
|
|
|
|
2015-10-14 15:57:23 +03:00
|
|
|
namespace OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest;
|
2015-09-08 16:35:30 +03:00
|
|
|
|
|
|
|
use OC\Files\View;
|
|
|
|
use Test\Traits\EncryptionTrait;
|
|
|
|
|
2015-11-20 13:27:11 +03:00
|
|
|
/**
|
|
|
|
* Class EncryptionUploadTest
|
|
|
|
*
|
|
|
|
* @group DB
|
|
|
|
*
|
|
|
|
* @package OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest
|
|
|
|
*/
|
2015-09-08 16:35:30 +03:00
|
|
|
class EncryptionUploadTest extends UploadTest {
|
|
|
|
use EncryptionTrait;
|
|
|
|
|
|
|
|
protected function setupUser($name, $password) {
|
|
|
|
$this->createUser($name, $password);
|
|
|
|
$tmpFolder = \OC::$server->getTempManager()->getTemporaryFolder();
|
|
|
|
$this->registerMount($name, '\OC\Files\Storage\Local', '/' . $name, ['datadir' => $tmpFolder]);
|
|
|
|
$this->setupForUser($name, $password);
|
|
|
|
$this->loginWithEncryption($name);
|
|
|
|
return new View('/' . $name . '/files');
|
|
|
|
}
|
|
|
|
}
|