Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2019-10-25 11:15:50 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2019-10-25 22:39:49 +0300
commit0599536c823eeea76217036a41a891345ff39c28 (patch)
treec4f8c267a5cf311ce9847ccb7a4c56a8ca373bbf /apps/files_sharing/tests
parent52870fd1d24caba10726c95e266b876394e9dbf2 (diff)
Remove unneeded calls to "ShareManager::shareProviderExists()"
"ShareManager::getSharesBy()" already checks if the share provider exists before returning the shares and, if the provider does not exist, it returns an empty array. Therefore it is not needed to explicitly check if the provider exists or not. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r--apps/files_sharing/tests/Controller/ShareAPIControllerTest.php15
1 files changed, 3 insertions, 12 deletions
diff --git a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php
index 4fda1aa4156..fd6aed09a9f 100644
--- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php
+++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php
@@ -1093,6 +1093,8 @@ class ShareAPIControllerTest extends TestCase {
$file1UserShareOwnerExpected,
$file1GroupShareOwnerExpected,
$file1LinkShareOwnerExpected,
+ $file1EmailShareOwnerExpected,
+ $file1CircleShareOwnerExpected,
$file1RoomShareOwnerExpected,
]
],
@@ -1113,8 +1115,6 @@ class ShareAPIControllerTest extends TestCase {
],
],
[
- IShare::TYPE_EMAIL => true,
- IShare::TYPE_CIRCLE => true,
IShare::TYPE_REMOTE => true,
IShare::TYPE_REMOTE_GROUP => true,
],
@@ -1261,6 +1261,7 @@ class ShareAPIControllerTest extends TestCase {
$file1UserShareOwnerExpected,
$file1GroupShareOwnerExpected,
$file1LinkShareOwnerExpected,
+ $file1EmailShareOwnerExpected,
$file1RoomShareOwnerExpected,
]
],
@@ -1280,7 +1281,6 @@ class ShareAPIControllerTest extends TestCase {
],
],
[
- IShare::TYPE_EMAIL => true,
IShare::TYPE_REMOTE => true,
],
[
@@ -1349,15 +1349,6 @@ class ShareAPIControllerTest extends TestCase {
}
));
- $shareProviderExistsMap = [
- [IShare::TYPE_EMAIL, $extraShareTypes[IShare::TYPE_EMAIL] ?? false],
- [IShare::TYPE_CIRCLE, $extraShareTypes[IShare::TYPE_CIRCLE] ?? false],
- ];
-
- $this->shareManager
- ->method('shareProviderExists')
- ->will($this->returnValueMap($shareProviderExistsMap));
-
$this->shareManager
->method('outgoingServer2ServerSharesAllowed')
->willReturn($extraShareTypes[ISHARE::TYPE_REMOTE] ?? false);