[Pkg-owncloud-commits] [owncloud] 59/111: tests added
David Prévot
taffit at moszumanska.debian.org
Wed Nov 20 21:38:41 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit f36ee69855384f0a42e745efad337a2155909f9a
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date: Fri Nov 15 16:49:50 2013 +0100
tests added
---
apps/files_encryption/tests/helper.php | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/apps/files_encryption/tests/helper.php b/apps/files_encryption/tests/helper.php
index 067fc76..cd2be70 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));
+ }
+
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list