diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-11-15 07:53:23 -0800 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-11-15 07:53:23 -0800 |
commit | 6355af162cf1c68aaf00eaf1d19b8b5fba7e84a0 (patch) | |
tree | 2f63bb63a507a7a9f82c72e7ba21d5f382f5cd67 /apps/files_encryption/tests | |
parent | fa44c699f717e115638884b442874168badda5f7 (diff) | |
parent | f36ee69855384f0a42e745efad337a2155909f9a (diff) | |
download | nextcloud-server-6355af162cf1c68aaf00eaf1d19b8b5fba7e84a0.tar.gz nextcloud-server-6355af162cf1c68aaf00eaf1d19b8b5fba7e84a0.zip |
Merge pull request #5880 from owncloud/replace_etmp_files
write encryption tmp files to the cache folder
Diffstat (limited to 'apps/files_encryption/tests')
-rw-r--r-- | apps/files_encryption/tests/helper.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/apps/files_encryption/tests/helper.php b/apps/files_encryption/tests/helper.php index 067fc763a95..cd2be70a8fe 100644 --- a/apps/files_encryption/tests/helper.php +++ b/apps/files_encryption/tests/helper.php @@ -51,4 +51,17 @@ class Test_Encryption_Helper extends \PHPUnit_Framework_TestCase { $this->assertEquals('testfile.txt', Encryption\Helper::stripPartialFileExtension($filename)); } -}
\ No newline at end of file + function testGetPathToRealFile() { + + // the relative path to /user/files/ that's what we want to get from getPathToRealFile() + $relativePath = "foo/bar/test.txt"; + + // test paths + $versionPath = "/user/files_versions/foo/bar/test.txt.v456756835"; + $cachePath = "/user/cache/transferid636483/foo/bar/test.txt"; + + $this->assertEquals($relativePath, Encryption\Helper::getPathToRealFile($versionPath)); + $this->assertEquals($relativePath, Encryption\Helper::getPathToRealFile($cachePath)); + } + +} |