summaryrefslogtreecommitdiffstats
path: root/tests/lib/Collaboration
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-10-29 17:00:09 +0100
committerJulius Härtl <jus@bitgrid.net>2018-10-30 10:19:35 +0100
commit61af60752555bb0c7f0a30cb7b7f35e7ca45fa45 (patch)
treef9597f423477fef10fa687d7ba98ed8dcc3866b9 /tests/lib/Collaboration
parent192324e4decc850d5def1394581a0dce2f2402d6 (diff)
downloadnextcloud-server-61af60752555bb0c7f0a30cb7b7f35e7ca45fa45.tar.gz
nextcloud-server-61af60752555bb0c7f0a30cb7b7f35e7ca45fa45.zip
Make enhancing entries with type property optional
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'tests/lib/Collaboration')
-rw-r--r--tests/lib/Collaboration/Collaborators/RemotePluginTest.php36
1 files changed, 30 insertions, 6 deletions
diff --git a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php
index ac050e23562..e253f2dfc9f 100644
--- a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php
+++ b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php
@@ -66,7 +66,7 @@ class RemotePluginTest extends TestCase {
}
public function instantiatePlugin() {
- $this->plugin = new RemotePlugin($this->contactsManager, $this->cloudIdManager, $this->config, $this->userManager);
+ $this->plugin = new RemotePlugin($this->contactsManager, $this->cloudIdManager, $this->config, $this->userManager, 'admin');
}
/**
@@ -158,14 +158,17 @@ class RemotePluginTest extends TestCase {
'test',
[
[
+ 'UID' => 'uid',
'FN' => 'User3 @ Localhost',
],
[
+ 'UID' => 'uid',
'FN' => 'User2 @ Localhost',
'CLOUD' => [
],
],
[
+ 'UID' => 'uid1',
'FN' => 'User @ Localhost',
'CLOUD' => [
'username@localhost',
@@ -173,7 +176,7 @@ class RemotePluginTest extends TestCase {
],
],
true,
- ['remotes' => [['label' => 'User @ Localhost (username@localhost)', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'username@localhost', 'server' => 'localhost']]], 'exact' => ['remotes' => []]],
+ ['remotes' => [['label' => 'User @ Localhost (username@localhost)', 'uuid' => 'uid1', 'type' => '', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'username@localhost', 'server' => 'localhost']]], 'exact' => ['remotes' => []]],
false,
true,
],
@@ -181,14 +184,17 @@ class RemotePluginTest extends TestCase {
'test',
[
[
+ 'UID' => 'uid',
'FN' => 'User3 @ Localhost',
],
[
+ 'UID' => 'uid',
'FN' => 'User2 @ Localhost',
'CLOUD' => [
],
],
[
+ 'UID' => 'uid',
'FN' => 'User @ Localhost',
'CLOUD' => [
'username@localhost',
@@ -204,14 +210,17 @@ class RemotePluginTest extends TestCase {
'test@remote',
[
[
+ 'UID' => 'uid',
'FN' => 'User3 @ Localhost',
],
[
+ 'UID' => 'uid',
'FN' => 'User2 @ Localhost',
'CLOUD' => [
],
],
[
+ 'UID' => 'uid',
'FN' => 'User @ Localhost',
'CLOUD' => [
'username@localhost',
@@ -219,7 +228,7 @@ class RemotePluginTest extends TestCase {
],
],
true,
- ['remotes' => [['label' => 'User @ Localhost (username@localhost)', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'username@localhost', 'server' => 'localhost']]], 'exact' => ['remotes' => [['label' => 'test@remote', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'test@remote']]]]],
+ ['remotes' => [['label' => 'User @ Localhost (username@localhost)', 'uuid' => 'uid', 'type' => '', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'username@localhost', 'server' => 'localhost']]], 'exact' => ['remotes' => [['label' => 'test@remote', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'test@remote']]]]],
false,
true,
],
@@ -227,14 +236,17 @@ class RemotePluginTest extends TestCase {
'test@remote',
[
[
+ 'UID' => 'uid',
'FN' => 'User3 @ Localhost',
],
[
+ 'UID' => 'uid',
'FN' => 'User2 @ Localhost',
'CLOUD' => [
],
],
[
+ 'UID' => 'uid',
'FN' => 'User @ Localhost',
'CLOUD' => [
'username@localhost',
@@ -250,14 +262,17 @@ class RemotePluginTest extends TestCase {
'username@localhost',
[
[
+ 'UID' => 'uid3',
'FN' => 'User3 @ Localhost',
],
[
+ 'UID' => '2',
'FN' => 'User2 @ Localhost',
'CLOUD' => [
],
],
[
+ 'UID' => 'uid1',
'FN' => 'User @ Localhost',
'CLOUD' => [
'username@localhost',
@@ -265,7 +280,7 @@ class RemotePluginTest extends TestCase {
],
],
true,
- ['remotes' => [], 'exact' => ['remotes' => [['label' => 'User @ Localhost (username@localhost)', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'username@localhost', 'server' => 'localhost']]]]],
+ ['remotes' => [], 'exact' => ['remotes' => [['label' => 'User @ Localhost (username@localhost)', 'uuid' => 'uid1', 'type' => '', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'username@localhost', 'server' => 'localhost']]]]],
true,
true,
],
@@ -273,14 +288,17 @@ class RemotePluginTest extends TestCase {
'username@localhost',
[
[
+ 'UID' => 'uid3',
'FN' => 'User3 @ Localhost',
],
[
+ 'UID' => 'uid2',
'FN' => 'User2 @ Localhost',
'CLOUD' => [
],
],
[
+ 'UID' => 'uid1',
'FN' => 'User @ Localhost',
'CLOUD' => [
'username@localhost',
@@ -288,7 +306,7 @@ class RemotePluginTest extends TestCase {
],
],
false,
- ['remotes' => [], 'exact' => ['remotes' => [['label' => 'User @ Localhost (username@localhost)', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'username@localhost', 'server' => 'localhost']]]]],
+ ['remotes' => [], 'exact' => ['remotes' => [['label' => 'User @ Localhost (username@localhost)', 'uuid' => 'uid1', 'type' => '', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'username@localhost', 'server' => 'localhost']]]]],
true,
true,
],
@@ -297,14 +315,17 @@ class RemotePluginTest extends TestCase {
'user name@localhost',
[
[
+ 'UID' => 'uid1',
'FN' => 'User3 @ Localhost',
],
[
+ 'UID' => 'uid2',
'FN' => 'User2 @ Localhost',
'CLOUD' => [
],
],
[
+ 'UID' => 'uid3',
'FN' => 'User Name @ Localhost',
'CLOUD' => [
'user name@localhost',
@@ -312,7 +333,7 @@ class RemotePluginTest extends TestCase {
],
],
false,
- ['remotes' => [], 'exact' => ['remotes' => [['label' => 'User Name @ Localhost (user name@localhost)', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'user name@localhost', 'server' => 'localhost']]]]],
+ ['remotes' => [], 'exact' => ['remotes' => [['label' => 'User Name @ Localhost (user name@localhost)', 'uuid' => 'uid3', 'type' => '', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'user name@localhost', 'server' => 'localhost']]]]],
true,
true,
],
@@ -321,14 +342,17 @@ class RemotePluginTest extends TestCase {
'user space@remote',
[
[
+ 'UID' => 'uid3',
'FN' => 'User3 @ Localhost',
],
[
+ 'UID' => 'uid2',
'FN' => 'User2 @ Localhost',
'CLOUD' => [
],
],
[
+ 'UID' => 'uid1',
'FN' => 'User @ Localhost',
'CLOUD' => [
'username@localhost',