aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Collaboration
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2024-09-15 22:32:31 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2024-09-15 22:32:31 +0200
commit49dd79eabb2b8902559a7a4e8f8fcad54f46b604 (patch)
tree2af18db46ba463368dc4461d7436fb69577923de /tests/lib/Collaboration
parent4281ce6fa1bb8235426099d720734d2394bec203 (diff)
downloadnextcloud-server-49dd79eabb2b8902559a7a4e8f8fcad54f46b604.tar.gz
nextcloud-server-49dd79eabb2b8902559a7a4e8f8fcad54f46b604.zip
refactor: Add void return type to PHPUnit test methods
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/Collaboration')
-rw-r--r--tests/lib/Collaboration/Collaborators/GroupPluginTest.php2
-rw-r--r--tests/lib/Collaboration/Collaborators/LookupPluginTest.php10
-rw-r--r--tests/lib/Collaboration/Collaborators/MailPluginTest.php4
-rw-r--r--tests/lib/Collaboration/Collaborators/RemotePluginTest.php6
-rw-r--r--tests/lib/Collaboration/Collaborators/SearchResultTest.php4
-rw-r--r--tests/lib/Collaboration/Collaborators/SearchTest.php2
-rw-r--r--tests/lib/Collaboration/Collaborators/UserPluginTest.php6
7 files changed, 17 insertions, 17 deletions
diff --git a/tests/lib/Collaboration/Collaborators/GroupPluginTest.php b/tests/lib/Collaboration/Collaborators/GroupPluginTest.php
index f9ac2c408db..e52ae95bf34 100644
--- a/tests/lib/Collaboration/Collaborators/GroupPluginTest.php
+++ b/tests/lib/Collaboration/Collaborators/GroupPluginTest.php
@@ -441,7 +441,7 @@ class GroupPluginTest extends TestCase {
array $expected,
bool $reachedEnd,
$singleGroup
- ) {
+ ): void {
$this->config->expects($this->any())
->method('getAppValue')
->willReturnCallback(
diff --git a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php
index 631d6ce0296..b54ca3ee4c3 100644
--- a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php
+++ b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php
@@ -69,7 +69,7 @@ class LookupPluginTest extends TestCase {
);
}
- public function testSearchNoLookupServerURI() {
+ public function testSearchNoLookupServerURI(): void {
$this->config->expects($this->once())
->method('getAppValue')
->with('files_sharing', 'lookupServerEnabled', 'yes')
@@ -98,7 +98,7 @@ class LookupPluginTest extends TestCase {
$this->plugin->search('foobar', 10, 0, $searchResult);
}
- public function testSearchNoInternet() {
+ public function testSearchNoInternet(): void {
$this->config->expects($this->once())
->method('getAppValue')
->with('files_sharing', 'lookupServerEnabled', 'yes')
@@ -126,7 +126,7 @@ class LookupPluginTest extends TestCase {
* @dataProvider searchDataProvider
* @param array $searchParams
*/
- public function testSearch(array $searchParams) {
+ public function testSearch(array $searchParams): void {
$type = new SearchResultType('lookup');
/** @var ISearchResult|MockObject $searchResult */
@@ -189,7 +189,7 @@ class LookupPluginTest extends TestCase {
* @param bool $GSEnabled
* @param bool $LookupEnabled
*/
- public function testSearchEnableDisableLookupServer(array $searchParams, $GSEnabled, $LookupEnabled) {
+ public function testSearchEnableDisableLookupServer(array $searchParams, $GSEnabled, $LookupEnabled): void {
$type = new SearchResultType('lookup');
/** @var ISearchResult|MockObject $searchResult */
@@ -258,7 +258,7 @@ class LookupPluginTest extends TestCase {
}
- public function testSearchLookupServerDisabled() {
+ public function testSearchLookupServerDisabled(): void {
$this->config->expects($this->once())
->method('getAppValue')
->with('files_sharing', 'lookupServerEnabled', 'yes')
diff --git a/tests/lib/Collaboration/Collaborators/MailPluginTest.php b/tests/lib/Collaboration/Collaborators/MailPluginTest.php
index b21e6f1ba4d..568325fd30c 100644
--- a/tests/lib/Collaboration/Collaborators/MailPluginTest.php
+++ b/tests/lib/Collaboration/Collaborators/MailPluginTest.php
@@ -94,7 +94,7 @@ class MailPluginTest extends TestCase {
* @param array $expected
* @param bool $reachedEnd
*/
- public function testSearch($searchTerm, $contacts, $shareeEnumeration, $expected, $exactIdMatch, $reachedEnd, $validEmail) {
+ public function testSearch($searchTerm, $contacts, $shareeEnumeration, $expected, $exactIdMatch, $reachedEnd, $validEmail): void {
$this->config->expects($this->any())
->method('getAppValue')
->willReturnCallback(
@@ -577,7 +577,7 @@ class MailPluginTest extends TestCase {
* @param bool $reachedEnd
* @param array groups
*/
- public function testSearchGroupsOnly($searchTerm, $contacts, $expected, $exactIdMatch, $reachedEnd, $userToGroupMapping, $validEmail) {
+ public function testSearchGroupsOnly($searchTerm, $contacts, $expected, $exactIdMatch, $reachedEnd, $userToGroupMapping, $validEmail): void {
$this->config->expects($this->any())
->method('getAppValue')
->willReturnCallback(
diff --git a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php
index f1668dbcec2..14894aa2df6 100644
--- a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php
+++ b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php
@@ -79,7 +79,7 @@ class RemotePluginTest extends TestCase {
* @param bool $exactIdMatch
* @param bool $reachedEnd
*/
- public function testSearch($searchTerm, array $contacts, $shareeEnumeration, array $expected, $exactIdMatch, $reachedEnd) {
+ public function testSearch($searchTerm, array $contacts, $shareeEnumeration, array $expected, $exactIdMatch, $reachedEnd): void {
$this->config->expects($this->any())
->method('getAppValue')
->willReturnCallback(
@@ -117,7 +117,7 @@ class RemotePluginTest extends TestCase {
* @param string $expectedUser
* @param string $expectedUrl
*/
- public function testSplitUserRemote($remote, $expectedUser, $expectedUrl) {
+ public function testSplitUserRemote($remote, $expectedUser, $expectedUrl): void {
$this->instantiatePlugin();
$this->contactsManager->expects($this->any())
@@ -134,7 +134,7 @@ class RemotePluginTest extends TestCase {
*
* @param string $id
*/
- public function testSplitUserRemoteError($id) {
+ public function testSplitUserRemoteError($id): void {
$this->expectException(\Exception::class);
$this->instantiatePlugin();
diff --git a/tests/lib/Collaboration/Collaborators/SearchResultTest.php b/tests/lib/Collaboration/Collaborators/SearchResultTest.php
index b91e7f5a12d..6641a2caed1 100644
--- a/tests/lib/Collaboration/Collaborators/SearchResultTest.php
+++ b/tests/lib/Collaboration/Collaborators/SearchResultTest.php
@@ -41,7 +41,7 @@ class SearchResultTest extends TestCase {
* @param array $toAdd
* @param array $expected
*/
- public function testAddResultSet(array $toAdd, array $expected) {
+ public function testAddResultSet(array $toAdd, array $expected): void {
$result = new SearchResult();
foreach ($toAdd as $type => $results) {
@@ -72,7 +72,7 @@ class SearchResultTest extends TestCase {
* @param string $id
* @param bool $expected
*/
- public function testHasResult(array $toAdd, $type, $id, $expected) {
+ public function testHasResult(array $toAdd, $type, $id, $expected): void {
$result = new SearchResult();
foreach ($toAdd as $addType => $results) {
diff --git a/tests/lib/Collaboration/Collaborators/SearchTest.php b/tests/lib/Collaboration/Collaborators/SearchTest.php
index d23f584cb8a..88bdfa6047e 100644
--- a/tests/lib/Collaboration/Collaborators/SearchTest.php
+++ b/tests/lib/Collaboration/Collaborators/SearchTest.php
@@ -43,7 +43,7 @@ class SearchTest extends TestCase {
array $mockedMailResult,
array $expected,
bool $expectedMoreResults
- ) {
+ ): void {
$searchResult = new SearchResult();
$userPlugin = $this->createMock(ISearchPlugin::class);
diff --git a/tests/lib/Collaboration/Collaborators/UserPluginTest.php b/tests/lib/Collaboration/Collaborators/UserPluginTest.php
index 4ba03224533..c6a266b55d6 100644
--- a/tests/lib/Collaboration/Collaborators/UserPluginTest.php
+++ b/tests/lib/Collaboration/Collaborators/UserPluginTest.php
@@ -442,7 +442,7 @@ class UserPluginTest extends TestCase {
$singleUser,
array $users = [],
$shareeEnumerationPhone = false
- ) {
+ ): void {
$this->mockConfig(['core' => [
'shareapi_only_share_with_group_members' => $shareWithGroupOnly ? 'yes' : 'no',
'shareapi_allow_share_dialog_user_enumeration' => $shareeEnumeration? 'yes' : 'no',
@@ -539,7 +539,7 @@ class UserPluginTest extends TestCase {
* @param array $expectedUIDs
* @param $currentUserId
*/
- public function testTakeOutCurrentUser(array $users, array $expectedUIDs, $currentUserId) {
+ public function testTakeOutCurrentUser(array $users, array $expectedUIDs, $currentUserId): void {
$this->instantiatePlugin();
$this->session->expects($this->once())
@@ -719,7 +719,7 @@ class UserPluginTest extends TestCase {
/**
* @dataProvider dataSearchEnumeration
*/
- public function testSearchEnumerationLimit($search, $userGroups, $matchingUsers, $result, $mockedSettings) {
+ public function testSearchEnumerationLimit($search, $userGroups, $matchingUsers, $result, $mockedSettings): void {
$this->mockConfig($mockedSettings);
$userResults = [];