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:
authorBjoern Schiessle <schiessle@owncloud.com>2013-11-15 19:49:50 +0400
committerBjoern Schiessle <schiessle@owncloud.com>2013-11-15 19:49:50 +0400
commitf36ee69855384f0a42e745efad337a2155909f9a (patch)
tree159811b197081c852af64b92ca2a265fd899d54c /apps/files_encryption/tests/helper.php
parentfaa08da9441f0f4661364f97f2855b55f726e5fa (diff)
tests added
Diffstat (limited to 'apps/files_encryption/tests/helper.php')
-rw-r--r--apps/files_encryption/tests/helper.php15
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));
+ }
+
+}