aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Share20/DefaultShareProviderTest.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-04-11 12:40:36 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-04-13 12:58:52 +0200
commit629b7c0fc38d9a2c33805bfcf4359e263e4ae68f (patch)
tree915d48dcfbc021fad3cbff2a5c53e7de006e630e /tests/lib/Share20/DefaultShareProviderTest.php
parent6c23a5fa3511e5212c83e8407fa18b12ec975f97 (diff)
downloadnextcloud-server-629b7c0fc38d9a2c33805bfcf4359e263e4ae68f.tar.gz
nextcloud-server-629b7c0fc38d9a2c33805bfcf4359e263e4ae68f.zip
Adjust docs and make !$currentAccess simpler
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/Share20/DefaultShareProviderTest.php')
-rw-r--r--tests/lib/Share20/DefaultShareProviderTest.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/lib/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php
index 6c351f1a6d9..0fa8aa3d0c6 100644
--- a/tests/lib/Share20/DefaultShareProviderTest.php
+++ b/tests/lib/Share20/DefaultShareProviderTest.php
@@ -2462,6 +2462,10 @@ class DefaultShareProviderTest extends \Test\TestCase {
$folder2 = $folder1->newFolder('baz');
$file1 = $folder2->newFile('bar');
+ $result = $provider->getAccessList([$folder1, $folder2, $file1], false);
+ $this->assertCount(0, $result['users']);
+ $this->assertFalse($result['public']);
+
$shareManager = \OC::$server->getShareManager();
$share1 = $shareManager->newShare();
$share1->setNode($folder1)
@@ -2503,10 +2507,10 @@ class DefaultShareProviderTest extends \Test\TestCase {
$result = $provider->getAccessList([$folder1, $folder2, $file1], false);
$this->assertCount(4, $result['users']);
- $this->assertArrayHasKey('testShare2', $result['users']);
- $this->assertArrayHasKey('testShare3', $result['users']);
- $this->assertArrayHasKey('testShare4', $result['users']);
- $this->assertArrayHasKey('testShare5', $result['users']);
+ $this->assertContains('testShare2', $result['users']);
+ $this->assertContains('testShare3', $result['users']);
+ $this->assertContains('testShare4', $result['users']);
+ $this->assertContains('testShare5', $result['users']);
$this->assertTrue($result['public']);
$provider->delete($share1);
@@ -2549,6 +2553,10 @@ class DefaultShareProviderTest extends \Test\TestCase {
$folder2 = $folder1->newFolder('baz');
$file1 = $folder2->newFile('bar');
+ $result = $provider->getAccessList([$folder1, $folder2, $file1], false);
+ $this->assertCount(0, $result['users']);
+ $this->assertFalse($result['public']);
+
$shareManager = \OC::$server->getShareManager();
$share1 = $shareManager->newShare();
$share1->setNode($folder1)