Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_encryption/tests/proxy.php')
-rw-r--r--apps/files_encryption/tests/proxy.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/apps/files_encryption/tests/proxy.php b/apps/files_encryption/tests/proxy.php
index 51cc0b795e3..647ee955eb1 100644
--- a/apps/files_encryption/tests/proxy.php
+++ b/apps/files_encryption/tests/proxy.php
@@ -112,4 +112,24 @@ class Test_Encryption_Proxy extends \PHPUnit_Framework_TestCase {
}
+ function testPostFileSizeWithDirectory() {
+
+ $this->view->file_put_contents($this->filename, $this->data);
+
+ \OC_FileProxy::$enabled = false;
+
+ // get root size, must match the file's unencrypted size
+ $unencryptedSize = $this->view->filesize('');
+
+ \OC_FileProxy::$enabled = true;
+
+ $encryptedSize = $this->view->filesize('');
+
+ $this->assertTrue($encryptedSize !== $unencryptedSize);
+
+ // cleanup
+ $this->view->unlink($this->filename);
+
+ }
+
}