From dc870cb450cabadf79fb805715ed772bab8baafd Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 8 Sep 2015 15:35:30 +0200 Subject: [PATCH] Add tests for doing dav requests with encryption enabled --- .../requesttest/encryptionuploadtest.php | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/lib/connector/sabre/requesttest/encryptionuploadtest.php diff --git a/tests/lib/connector/sabre/requesttest/encryptionuploadtest.php b/tests/lib/connector/sabre/requesttest/encryptionuploadtest.php new file mode 100644 index 00000000000..f1849c94760 --- /dev/null +++ b/tests/lib/connector/sabre/requesttest/encryptionuploadtest.php @@ -0,0 +1,25 @@ + + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace Test\Connector\Sabre\RequestTest; + +use OC\Files\View; +use Test\Traits\EncryptionTrait; + +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'); + } +}