diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-03-26 14:26:07 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-03-26 14:26:07 +0100 |
commit | 371a924c92bb751b81e2a819d8c581743be7a797 (patch) | |
tree | f0b1ec313deb42850ca754c5894737dc2a0a8fb9 /apps/files_encryption/tests | |
parent | db6fb198fe7b8fa854050730b32d58d3787505b3 (diff) | |
parent | 028973cbea865075a32db6228b56b7d3960771d6 (diff) | |
download | nextcloud-server-371a924c92bb751b81e2a819d8c581743be7a797.tar.gz nextcloud-server-371a924c92bb751b81e2a819d8c581743be7a797.zip |
merge master into webdav-injection
Diffstat (limited to 'apps/files_encryption/tests')
-rw-r--r-- | apps/files_encryption/tests/proxy.php | 20 |
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); + + } + } |