summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/connector/sabre
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-02-26 16:29:42 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-03-01 15:21:24 +0100
commit37f12068180c33fe09e5c0d342a9ba1ec646f7aa (patch)
tree027307a1d62886c9062cc52588428528d89bf794 /apps/dav/tests/unit/connector/sabre
parent900dcf6594d51f603b1a863020363987ed7ab003 (diff)
downloadnextcloud-server-37f12068180c33fe09e5c0d342a9ba1ec646f7aa.tar.gz
nextcloud-server-37f12068180c33fe09e5c0d342a9ba1ec646f7aa.zip
allow putting the part file in the view root
Diffstat (limited to 'apps/dav/tests/unit/connector/sabre')
-rw-r--r--apps/dav/tests/unit/connector/sabre/requesttest/partfileinrootupload.php56
1 files changed, 56 insertions, 0 deletions
diff --git a/apps/dav/tests/unit/connector/sabre/requesttest/partfileinrootupload.php b/apps/dav/tests/unit/connector/sabre/requesttest/partfileinrootupload.php
new file mode 100644
index 00000000000..52790c5b00b
--- /dev/null
+++ b/apps/dav/tests/unit/connector/sabre/requesttest/partfileinrootupload.php
@@ -0,0 +1,56 @@
+<?php
+/**
+ * @author Robin Appelman <icewind@owncloud.com>
+ * @author Thomas Müller <thomas.mueller@tmit.eu>
+ *
+ * @copyright Copyright (c) 2016, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest;
+
+use OC\Files\View;
+use Test\Traits\EncryptionTrait;
+
+/**
+ * Class EncryptionUploadTest
+ *
+ * @group DB
+ *
+ * @package OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest
+ */
+class PartFileInRootUpload extends UploadTest {
+ protected function setUp() {
+ $config = \OC::$server->getConfig();
+ $mockConfig = $this->getMock('\OCP\IConfig');
+ $mockConfig->expects($this->any())
+ ->method('getSystemValue')
+ ->will($this->returnCallback(function ($key, $default) use ($config) {
+ if ($key === 'part_file_in_storage') {
+ return false;
+ } else {
+ return $config->getSystemValue($key, $default);
+ }
+ }));
+ $this->overwriteService('AllConfig', $mockConfig);
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ $this->restoreService('AllConfig');
+ return parent::tearDown();
+ }
+}