From 2990b0e07e418577d55368c21200ada86c381b51 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Thu, 23 Apr 2015 16:48:11 +0200 Subject: update share keys if a file is moved to a shared folder --- tests/lib/encryption/utiltest.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'tests/lib/encryption/utiltest.php') diff --git a/tests/lib/encryption/utiltest.php b/tests/lib/encryption/utiltest.php index dc6205e16fd..7de57043920 100644 --- a/tests/lib/encryption/utiltest.php +++ b/tests/lib/encryption/utiltest.php @@ -152,4 +152,25 @@ class UtilTest extends TestCase { return false; } + /** + * @dataProvider dataTestIsFile + */ + public function testIsFile($path, $expected) { + $this->assertSame($expected, + $this->util->isFile($path) + ); + } + + public function dataTestIsFile() { + return array( + array('/user/files/test.txt', true), + array('/user/files', true), + array('/user/files_versions/test.txt', false), + array('/user/foo/files/test.txt', false), + array('/files/foo/files/test.txt', false), + array('/user', false), + array('/user/test.txt', false), + ); + } + } -- cgit v1.2.3