summaryrefslogtreecommitdiffstats
path: root/tests/lib/encryption/utiltest.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-04-23 16:48:11 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2015-04-23 17:18:48 +0200
commit2990b0e07e418577d55368c21200ada86c381b51 (patch)
treef09260b3be548d9ea0a86dd9d54b28ee8323ef14 /tests/lib/encryption/utiltest.php
parentf8f354b351a349898bbb5cdf2d9bee1c798c0f73 (diff)
downloadnextcloud-server-2990b0e07e418577d55368c21200ada86c381b51.tar.gz
nextcloud-server-2990b0e07e418577d55368c21200ada86c381b51.zip
update share keys if a file is moved to a shared folder
Diffstat (limited to 'tests/lib/encryption/utiltest.php')
-rw-r--r--tests/lib/encryption/utiltest.php21
1 files changed, 21 insertions, 0 deletions
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),
+ );
+ }
+
}