diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-01 16:56:28 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-01 16:56:28 +0200 |
commit | b6591084a133e5a7c5853074c375e5e904de7396 (patch) | |
tree | 81c75d1b63ede1b78a31069b38ab8daab3fca856 /tests | |
parent | 8ae4f5bf1a8adaac41715e2b5f1914ef899a09b6 (diff) | |
parent | e7232a848bd0c0846ea020f7b07f2cfe1298b1fb (diff) | |
download | nextcloud-server-b6591084a133e5a7c5853074c375e5e904de7396.tar.gz nextcloud-server-b6591084a133e5a7c5853074c375e5e904de7396.zip |
Merge pull request #19463 from owncloud/fix_18132
encryption: versions should always use the keys of the original file, no need to …
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/files/storage/wrapper/encryption.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/lib/files/storage/wrapper/encryption.php b/tests/lib/files/storage/wrapper/encryption.php index 44e910b901f..095405462df 100644 --- a/tests/lib/files/storage/wrapper/encryption.php +++ b/tests/lib/files/storage/wrapper/encryption.php @@ -558,4 +558,27 @@ class Encryption extends \Test\Files\Storage\Storage { $this->assertFalse(false); } + + /** + * @dataProvider dataTestIsVersion + * @param string $path + * @param bool $expected + */ + public function testIsVersion($path, $expected) { + $this->assertSame($expected, + $this->invokePrivate($this->instance, 'isVersion', [$path]) + ); + } + + public function dataTestIsVersion() { + return [ + ['files_versions/foo', true], + ['/files_versions/foo', true], + ['//files_versions/foo', true], + ['files/versions/foo', false], + ['files/files_versions/foo', false], + ['files_versions_test/foo', false], + ]; + } + } |