mirror of
https://github.com/nextcloud/server.git
synced 2026-07-04 15:27:31 -04:00
tests added
This commit is contained in:
parent
faa08da944
commit
f36ee69855
1 changed files with 14 additions and 1 deletions
|
|
@ -51,4 +51,17 @@ class Test_Encryption_Helper extends \PHPUnit_Framework_TestCase {
|
|||
$this->assertEquals('testfile.txt', Encryption\Helper::stripPartialFileExtension($filename));
|
||||
}
|
||||
|
||||
}
|
||||
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));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue