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

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>2019-12-02 17:11:00 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2019-12-02 21:18:28 +0300
commit2c76665cf4551529ea2c81b6d1e51fce2a7a834a (patch)
tree467861d128c5e9496ff72088755d1f358486bb6e /tests
parente2f98da6225068ab6975f7076948b6be83e7b8ed (diff)
Bump christophwurst/nextcloud_testing from 0.7.0 to 0.9.1
Bumps [christophwurst/nextcloud_testing](https://github.com/ChristophWurst/nextcloud_testing) from 0.7.0 to 0.9.1. - [Release notes](https://github.com/ChristophWurst/nextcloud_testing/releases) - [Commits](https://github.com/ChristophWurst/nextcloud_testing/compare/0.7.0...0.9.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests')
-rw-r--r--tests/HordeTranslationHandlerTest.php2
-rw-r--r--tests/Integration/FolderSynchronizationTest.php2
-rw-r--r--tests/Integration/Framework/SelfTest.php2
-rw-r--r--tests/Integration/Service/AvatarServiceIntegrationTest.php2
-rw-r--r--tests/Integration/Service/FolderMapperIntegrationTest.php2
-rw-r--r--tests/Integration/Service/MailTransmissionIntegrationTest.php2
-rw-r--r--tests/Integration/TestCase.php2
-rw-r--r--tests/SearchFolderTest.php2
-rw-r--r--tests/Unit/Command/CreateAccountTest.php2
-rw-r--r--tests/Unit/Controller/AccountsControllerTest.php51
-rw-r--r--tests/Unit/Controller/AliasesControllerTest.php2
-rw-r--r--tests/Unit/Controller/AutoconfigControllerTest.php2
-rw-r--r--tests/Unit/Controller/AvatarControllerTest.php4
-rw-r--r--tests/Unit/Controller/FoldersControllerTest.php2
-rw-r--r--tests/Unit/Controller/LocalAttachmentsControllerTest.php2
-rw-r--r--tests/Unit/Controller/MessagesControllerTest.php4
-rw-r--r--tests/Unit/Controller/PageControllerTest.php2
-rw-r--r--tests/Unit/Controller/PreferencesControllerTest.php2
-rw-r--r--tests/Unit/Controller/ProxyControllerTest.php7
-rw-r--r--tests/Unit/Db/AliasMapperTest.php4
-rw-r--r--tests/Unit/Db/CollectedAddressMapperTest.php2
-rw-r--r--tests/Unit/Db/MailAccountMapperTest.php2
-rw-r--r--tests/Unit/Db/MailboxMapperTest.php2
-rw-r--r--tests/Unit/Http/Middleware/ErrorMiddlewareTest.php2
-rw-r--r--tests/Unit/IMAP/AbstractTest.php4
-rw-r--r--tests/Unit/IMAP/FolderMapperTest.php2
-rw-r--r--tests/Unit/IMAP/IMAPClientFactoryTest.php2
-rw-r--r--tests/Unit/IMAP/MailboxSyncTest.php2
-rw-r--r--tests/Unit/IMAP/MessageMapperTest.php2
-rw-r--r--tests/Unit/IMAP/Search/SearchStrategyFactoryTest.php2
-rw-r--r--tests/Unit/IMAP/Sync/FavouritesMailboxSyncTest.php2
-rw-r--r--tests/Unit/IMAP/Sync/RequestTest.php2
-rw-r--r--tests/Unit/IMAP/Sync/SimpleMailboxSyncTest.php2
-rw-r--r--tests/Unit/IMAP/Sync/SynchronizerTest.php2
-rw-r--r--tests/Unit/Listener/AddressCollectionListenerTest.php2
-rw-r--r--tests/Unit/Listener/DeleteDraftListenerTest.php2
-rw-r--r--tests/Unit/Listener/DraftMailboxCreatorListenerTest.php2
-rw-r--r--tests/Unit/Listener/FlagRepliedMessageListenerTest.php2
-rw-r--r--tests/Unit/Listener/SaveSentMessageListenerTest.php2
-rw-r--r--tests/Unit/Listener/TrashMailboxCreatorListenerTest.php2
-rw-r--r--tests/Unit/Migration/FixCollectedAddressesTest.php2
-rw-r--r--tests/Unit/Model/MessageTest.php2
-rw-r--r--tests/Unit/SMTP/SmtpClientFactoryTest.php2
-rw-r--r--tests/Unit/Service/AccountServiceTest.php2
-rw-r--r--tests/Unit/Service/AliasesServiceTest.php2
-rw-r--r--tests/Unit/Service/Attachment/AttachmentServiceTest.php2
-rw-r--r--tests/Unit/Service/Attachment/AttachmentStorageTest.php2
-rw-r--r--tests/Unit/Service/Autocompletion/AddressCollectorTest.php2
-rw-r--r--tests/Unit/Service/Autocompletion/AutoCompleteServiceTest.php2
-rw-r--r--tests/Unit/Service/Autoconfig/AutoConfigTest.php2
-rw-r--r--tests/Unit/Service/Autoconfig/ConfigurationDetectorTest.php2
-rw-r--r--tests/Unit/Service/Autoconfig/ConnectivityTesterTest.php2
-rw-r--r--tests/Unit/Service/Autoconfig/ImapConnectivityTesterTest.php2
-rw-r--r--tests/Unit/Service/Autoconfig/ImapConnectorTest.php2
-rw-r--r--tests/Unit/Service/Autoconfig/ImapServerDetectorTest.php2
-rw-r--r--tests/Unit/Service/Autoconfig/IspDbTest.php2
-rw-r--r--tests/Unit/Service/Autoconfig/MxRecordTest.php4
-rw-r--r--tests/Unit/Service/Autoconfig/SmtpConnectivityTesterTest.php2
-rw-r--r--tests/Unit/Service/Autoconfig/SmtpServerDetectorTest.php2
-rw-r--r--tests/Unit/Service/Avatar/AddressbookSourceTest.php2
-rw-r--r--tests/Unit/Service/Avatar/CacheTest.php2
-rw-r--r--tests/Unit/Service/Avatar/CompositeAvatarSourceTest.php2
-rw-r--r--tests/Unit/Service/Avatar/DownloaderTest.php2
-rw-r--r--tests/Unit/Service/Avatar/FaviconSourceTest.php2
-rw-r--r--tests/Unit/Service/Avatar/GravatarSouceTest.php2
-rw-r--r--tests/Unit/Service/AvatarServiceTest.php2
-rw-r--r--tests/Unit/Service/ContactsIntegrationTest.php2
-rw-r--r--tests/Unit/Service/DefaultAccount/ManagerTest.php2
-rw-r--r--tests/Unit/Service/Group/NextcloudGroupServiceTest.php4
-rw-r--r--tests/Unit/Service/GroupsIntegrationTest.php2
-rw-r--r--tests/Unit/Service/MailManagerTest.php2
-rw-r--r--tests/Unit/Service/MailSearchTest.php2
-rw-r--r--tests/Unit/Service/MailTransmissionTest.php2
-rw-r--r--tests/Unit/Service/SetupServiceTest.php2
-rw-r--r--tests/Unit/Service/UserPreferenceServiceTest.php2
-rw-r--r--tests/Unit/Support/HostNameFactoryTest.php2
76 files changed, 107 insertions, 111 deletions
diff --git a/tests/HordeTranslationHandlerTest.php b/tests/HordeTranslationHandlerTest.php
index e87320d5a..9bc7cb552 100644
--- a/tests/HordeTranslationHandlerTest.php
+++ b/tests/HordeTranslationHandlerTest.php
@@ -27,7 +27,7 @@ class HordeTranslationHandlerTest extends TestCase {
private $handler;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->handler = new HordeTranslationHandler();
diff --git a/tests/Integration/FolderSynchronizationTest.php b/tests/Integration/FolderSynchronizationTest.php
index e84094564..841a10508 100644
--- a/tests/Integration/FolderSynchronizationTest.php
+++ b/tests/Integration/FolderSynchronizationTest.php
@@ -36,7 +36,7 @@ class FolderSynchronizationTest extends TestCase {
/** @var FoldersController */
private $foldersController;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->foldersController = new FoldersController('mail', OC::$server->getRequest(), OC::$server->query(AccountService::class), $this->getTestAccountUserId(), OC::$server->query(IMailManager::class));
diff --git a/tests/Integration/Framework/SelfTest.php b/tests/Integration/Framework/SelfTest.php
index 80ba3a561..1ab2f1bfb 100644
--- a/tests/Integration/Framework/SelfTest.php
+++ b/tests/Integration/Framework/SelfTest.php
@@ -49,7 +49,7 @@ class SelfTest extends TestCase {
$this->assertMessageCount(0, 'INBOX');
$id = $this->saveMessage('INBOX', $message);
$this->assertMessageCount(1, 'INBOX');
- $this->assertInternalType('int', $id);
+ $this->assertIsInt($id);
}
}
diff --git a/tests/Integration/Service/AvatarServiceIntegrationTest.php b/tests/Integration/Service/AvatarServiceIntegrationTest.php
index f1dd5286f..78e588414 100644
--- a/tests/Integration/Service/AvatarServiceIntegrationTest.php
+++ b/tests/Integration/Service/AvatarServiceIntegrationTest.php
@@ -43,7 +43,7 @@ class AvatarServiceIntegrationTest extends TestCase {
$cache->clear();
}
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->clearCache();
diff --git a/tests/Integration/Service/FolderMapperIntegrationTest.php b/tests/Integration/Service/FolderMapperIntegrationTest.php
index d3d1a60c9..1f8427f49 100644
--- a/tests/Integration/Service/FolderMapperIntegrationTest.php
+++ b/tests/Integration/Service/FolderMapperIntegrationTest.php
@@ -32,7 +32,7 @@ class FolderMapperIntegrationTest extends TestCase {
/** @var FolderMapper */
private $mapper;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->mapper = new FolderMapper();
diff --git a/tests/Integration/Service/MailTransmissionIntegrationTest.php b/tests/Integration/Service/MailTransmissionIntegrationTest.php
index e0176d1d3..8c7cd1837 100644
--- a/tests/Integration/Service/MailTransmissionIntegrationTest.php
+++ b/tests/Integration/Service/MailTransmissionIntegrationTest.php
@@ -60,7 +60,7 @@ class MailTransmissionIntegrationTest extends TestCase {
/** @var IMailTransmission */
private $transmission;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->resetImapAccount();
diff --git a/tests/Integration/TestCase.php b/tests/Integration/TestCase.php
index 85b2fdbbb..694f989e1 100644
--- a/tests/Integration/TestCase.php
+++ b/tests/Integration/TestCase.php
@@ -26,7 +26,7 @@ use ChristophWurst\Nextcloud\Testing\TestCase as Base;
class TestCase extends Base {
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
// If it's an IMAP test, we reset the test account automatically
diff --git a/tests/SearchFolderTest.php b/tests/SearchFolderTest.php
index 05b634228..541f4d480 100644
--- a/tests/SearchFolderTest.php
+++ b/tests/SearchFolderTest.php
@@ -38,7 +38,7 @@ class SearchFolderTest extends TestCase {
/** @var SearchFolder */
private $folder;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->accountId = 16;
diff --git a/tests/Unit/Command/CreateAccountTest.php b/tests/Unit/Command/CreateAccountTest.php
index a253c55c3..6ded877e5 100644
--- a/tests/Unit/Command/CreateAccountTest.php
+++ b/tests/Unit/Command/CreateAccountTest.php
@@ -45,7 +45,7 @@ class CreateAccountTest extends TestCase {
'smtp-password',
];
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->service = $this->getMockBuilder('\OCA\Mail\Service\AccountService')
diff --git a/tests/Unit/Controller/AccountsControllerTest.php b/tests/Unit/Controller/AccountsControllerTest.php
index ce6f0bcec..c6690ce2b 100644
--- a/tests/Unit/Controller/AccountsControllerTest.php
+++ b/tests/Unit/Controller/AccountsControllerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/**
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -43,35 +43,35 @@ use OCP\IL10N;
use OCP\ILogger;
use OCP\IRequest;
use OCP\Security\ICrypto;
-use PHPUnit_Framework_MockObject_MockObject;
+use PHPUnit\Framework\MockObject\MockObject;
class AccountsControllerTest extends TestCase {
/** @var string */
private $appName;
- /** @var IRequest|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|MockObject */
private $request;
- /** @var AccountService|PHPUnit_Framework_MockObject_MockObject */
+ /** @var AccountService|MockObject */
private $accountService;
- /** @var GroupsIntegration|PHPUnit_Framework_MockObject_MockObject */
+ /** @var GroupsIntegration|MockObject */
private $groupsIntegration;
/** @var string */
private $userId;
- /** @var AutoConfig|PHPUnit_Framework_MockObject_MockObject */
+ /** @var AutoConfig|MockObject */
private $autoConfig;
- /** @var ILogger|PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|MockObject */
private $logger;
- /** @var IL10N|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|MockObject */
private $l10n;
- /** @var ICrypto|PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICrypto|MockObject */
private $crypto;
/** @var AccountsController */
@@ -80,19 +80,19 @@ class AccountsControllerTest extends TestCase {
/** @var int */
private $accountId;
- /** @var Account|PHPUnit_Framework_MockObject_MockObject */
+ /** @var Account|MockObject */
private $account;
- /** @var AliasesService|PHPUnit_Framework_MockObject_MockObject */
+ /** @var AliasesService|MockObject */
private $aliasesService;
- /** @var IMailTransmission|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IMailTransmission|MockObject */
private $transmission;
- /** @var SetupService|PHPUnit_Framework_MockObject_MockObject */
+ /** @var SetupService|MockObject */
private $setupService;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->appName = 'mail';
@@ -281,12 +281,12 @@ class AccountsControllerTest extends TestCase {
$password = 'mypassword';
$accountName = 'Mail';
$imapHost = 'localhost';
- $imapPort = '993';
+ $imapPort = 993;
$imapSslMode = 'ssl';
$imapUser = 'user@domain.tld';
$imapPassword = 'mypassword';
$smtpHost = 'localhost';
- $smtpPort = '465';
+ $smtpPort = 465;
$smtpSslMode = 'none';
$smtpUser = 'user@domain.tld';
$smtpPassword = 'mypassword';
@@ -309,12 +309,12 @@ class AccountsControllerTest extends TestCase {
$password = 'mypassword';
$accountName = 'Mail';
$imapHost = 'localhost';
- $imapPort = '993';
+ $imapPort = 993;
$imapSslMode = 'ssl';
$imapUser = 'user@domain.tld';
$imapPassword = 'mypassword';
$smtpHost = 'localhost';
- $smtpPort = '465';
+ $smtpPort = 465;
$smtpSslMode = 'none';
$smtpUser = 'user@domain.tld';
$smtpPassword = 'mypassword';
@@ -334,12 +334,12 @@ class AccountsControllerTest extends TestCase {
$password = 'mypassword';
$accountName = 'Mail';
$imapHost = 'localhost';
- $imapPort = '993';
+ $imapPort = 993;
$imapSslMode = 'ssl';
$imapUser = 'user@domain.tld';
$imapPassword = 'mypassword';
$smtpHost = 'localhost';
- $smtpPort = '465';
+ $smtpPort = 465;
$smtpSslMode = 'none';
$smtpUser = 'user@domain.tld';
$smtpPassword = 'mypassword';
@@ -363,12 +363,12 @@ class AccountsControllerTest extends TestCase {
$password = 'mypassword';
$accountName = 'Mail';
$imapHost = 'localhost';
- $imapPort = '993';
+ $imapPort = 993;
$imapSslMode = 'ssl';
$imapUser = 'user@domain.tld';
$imapPassword = 'mypassword';
$smtpHost = 'localhost';
- $smtpPort = '465';
+ $smtpPort = 465;
$smtpSslMode = 'none';
$smtpUser = 'user@domain.tld';
$smtpPassword = 'mypassword';
@@ -453,15 +453,12 @@ class AccountsControllerTest extends TestCase {
}
public function testDraft() {
- $withPreviousDraft = true;
$subject = 'Hello';
$body = 'Hi!';
- $from = 'test@example.com';
$to = 'user1@example.com';
$cc = '"user2" <user2@example.com>, user3@example.com';
$bcc = 'user4@example.com';
- $messageId = 123;
- $uid = $withPreviousDraft ? 123 : null;
+ $uid = 123;
$newUID = 124;
$this->accountService->expects($this->once())
@@ -475,7 +472,7 @@ class AccountsControllerTest extends TestCase {
$expected = new JSONResponse([
'uid' => $newUID,
]);
- $actual = $this->controller->draft($this->accountId, $subject, $body, $to, $cc, $bcc, $uid, $messageId);
+ $actual = $this->controller->draft($this->accountId, $subject, $body, $to, $cc, $bcc, true, $uid);
$this->assertEquals($expected, $actual);
}
diff --git a/tests/Unit/Controller/AliasesControllerTest.php b/tests/Unit/Controller/AliasesControllerTest.php
index 27261f514..342de1e48 100644
--- a/tests/Unit/Controller/AliasesControllerTest.php
+++ b/tests/Unit/Controller/AliasesControllerTest.php
@@ -37,7 +37,7 @@ class AliasesControllerTest extends TestCase {
private $user;
private $alias;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->request = $this->getMockBuilder('OCP\IRequest')
->getMock();
diff --git a/tests/Unit/Controller/AutoconfigControllerTest.php b/tests/Unit/Controller/AutoconfigControllerTest.php
index 3cf2e297e..12e397473 100644
--- a/tests/Unit/Controller/AutoconfigControllerTest.php
+++ b/tests/Unit/Controller/AutoconfigControllerTest.php
@@ -31,7 +31,7 @@ class AutoConfigControllerTest extends TestCase {
private $service;
private $controller;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->request = $this->getMockBuilder('OCP\IRequest')->getMock();
diff --git a/tests/Unit/Controller/AvatarControllerTest.php b/tests/Unit/Controller/AvatarControllerTest.php
index b6df45e3d..20651c047 100644
--- a/tests/Unit/Controller/AvatarControllerTest.php
+++ b/tests/Unit/Controller/AvatarControllerTest.php
@@ -47,7 +47,7 @@ class AvatarControllerTest extends TestCase {
/** @var ITimeFactory */
private $oldFactory;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$request = $this->createMock(IRequest::class);
@@ -65,7 +65,7 @@ class AvatarControllerTest extends TestCase {
$this->controller = new AvatarsController('mail', $request, $this->avatarService, 'jane');
}
- protected function tearDown() {
+ protected function tearDown(): void {
parent::tearDown();
\OC::$server->offsetUnset(ITimeFactory::class);
diff --git a/tests/Unit/Controller/FoldersControllerTest.php b/tests/Unit/Controller/FoldersControllerTest.php
index f4f80e882..c2aaf68e7 100644
--- a/tests/Unit/Controller/FoldersControllerTest.php
+++ b/tests/Unit/Controller/FoldersControllerTest.php
@@ -54,7 +54,7 @@ class FoldersControllerTest extends TestCase {
/** @var FoldersController */
private $controller;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->request = $this->createMock(IRequest::class);
$this->accountService = $this->createMock(AccountService::class);
diff --git a/tests/Unit/Controller/LocalAttachmentsControllerTest.php b/tests/Unit/Controller/LocalAttachmentsControllerTest.php
index 3e06553ed..41112b143 100644
--- a/tests/Unit/Controller/LocalAttachmentsControllerTest.php
+++ b/tests/Unit/Controller/LocalAttachmentsControllerTest.php
@@ -45,7 +45,7 @@ class LocalAttachmentsControllerTest extends TestCase {
/** @var LocalAttachmentsController */
private $controller;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->request = $this->createMock(IRequest::class);
diff --git a/tests/Unit/Controller/MessagesControllerTest.php b/tests/Unit/Controller/MessagesControllerTest.php
index a8fec1627..669869c20 100644
--- a/tests/Unit/Controller/MessagesControllerTest.php
+++ b/tests/Unit/Controller/MessagesControllerTest.php
@@ -103,7 +103,7 @@ class MessagesControllerTest extends TestCase {
/** @var ITimeFactory */
private $oldFactory;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->appName = 'mail';
@@ -148,7 +148,7 @@ class MessagesControllerTest extends TestCase {
$this->attachment = $this->createMock(Attachment::class);
}
- protected function tearDown() {
+ protected function tearDown(): void {
parent::tearDown();
\OC::$server->offsetUnset(ITimeFactory::class);
diff --git a/tests/Unit/Controller/PageControllerTest.php b/tests/Unit/Controller/PageControllerTest.php
index 2dfa3e46d..af41e9862 100644
--- a/tests/Unit/Controller/PageControllerTest.php
+++ b/tests/Unit/Controller/PageControllerTest.php
@@ -78,7 +78,7 @@ class PageControllerTest extends TestCase {
/** @var PageController */
private $controller;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->appName = 'mail';
diff --git a/tests/Unit/Controller/PreferencesControllerTest.php b/tests/Unit/Controller/PreferencesControllerTest.php
index bb6b60b83..d1680ef2e 100644
--- a/tests/Unit/Controller/PreferencesControllerTest.php
+++ b/tests/Unit/Controller/PreferencesControllerTest.php
@@ -39,7 +39,7 @@ class PreferencesControllerTest extends TestCase {
/** @var PreferencesController */
private $controller;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$request = $this->createMock(IRequest::class);
diff --git a/tests/Unit/Controller/ProxyControllerTest.php b/tests/Unit/Controller/ProxyControllerTest.php
index f7d6ebe54..f3bda3d94 100644
--- a/tests/Unit/Controller/ProxyControllerTest.php
+++ b/tests/Unit/Controller/ProxyControllerTest.php
@@ -58,7 +58,7 @@ class ProxyControllerTest extends TestCase {
/** @var ProxyController */
private $controller;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->appName = 'mail';
@@ -142,9 +142,6 @@ class ProxyControllerTest extends TestCase {
$this->assertEquals($expected, $response);
}
- /**
- * @expectedException Exception
- */
public function testRedirectInvalidUrl() {
$this->controller = new ProxyController(
$this->appName,
@@ -154,6 +151,8 @@ class ProxyControllerTest extends TestCase {
$this->clientService,
''
);
+ $this->expectException(Exception::class);
+
$this->controller->redirect('ftps://example.com');
}
diff --git a/tests/Unit/Db/AliasMapperTest.php b/tests/Unit/Db/AliasMapperTest.php
index e35e10980..5f219d20e 100644
--- a/tests/Unit/Db/AliasMapperTest.php
+++ b/tests/Unit/Db/AliasMapperTest.php
@@ -34,7 +34,7 @@ use OCP\IDBConnection;
* @package OCA\Mail\Db
*/
class AliasMapperTest extends TestCase {
-
+
use DatabaseTransaction;
/** @var AliasMapper */
@@ -49,7 +49,7 @@ class AliasMapperTest extends TestCase {
/**
* Initialize Mapper
*/
- public function setup() {
+ public function setup(): void {
parent::setUp();
$this->db = OC::$server->getDatabaseConnection();
$this->mapper = new AliasMapper($this->db);
diff --git a/tests/Unit/Db/CollectedAddressMapperTest.php b/tests/Unit/Db/CollectedAddressMapperTest.php
index c88980dba..781137605 100644
--- a/tests/Unit/Db/CollectedAddressMapperTest.php
+++ b/tests/Unit/Db/CollectedAddressMapperTest.php
@@ -58,7 +58,7 @@ class CollectedAddressMapperTest extends TestCase {
/** @var CollectedAddress */
private $address3;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->db = OC::$server->getDatabaseConnection();
diff --git a/tests/Unit/Db/MailAccountMapperTest.php b/tests/Unit/Db/MailAccountMapperTest.php
index 2278bbe96..a22b9e5fd 100644
--- a/tests/Unit/Db/MailAccountMapperTest.php
+++ b/tests/Unit/Db/MailAccountMapperTest.php
@@ -49,7 +49,7 @@ class MailAccountMapperTest extends TestCase {
/**
* Initialize Mapper
*/
- public function setup(){
+ public function setup(): void {
parent::setUp();
$this->db = OC::$server->getDatabaseConnection();
$this->mapper = new MailAccountMapper($this->db);
diff --git a/tests/Unit/Db/MailboxMapperTest.php b/tests/Unit/Db/MailboxMapperTest.php
index 2016b7106..fa88eb541 100644
--- a/tests/Unit/Db/MailboxMapperTest.php
+++ b/tests/Unit/Db/MailboxMapperTest.php
@@ -43,7 +43,7 @@ class MailboxMapperTest extends TestCase {
/** @var MailboxMapper */
private $mapper;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->db = \OC::$server->getDatabaseConnection();
diff --git a/tests/Unit/Http/Middleware/ErrorMiddlewareTest.php b/tests/Unit/Http/Middleware/ErrorMiddlewareTest.php
index 1ecb4476c..84f285676 100644
--- a/tests/Unit/Http/Middleware/ErrorMiddlewareTest.php
+++ b/tests/Unit/Http/Middleware/ErrorMiddlewareTest.php
@@ -51,7 +51,7 @@ class ErrorMiddlewareTest extends TestCase {
/** @var ErrorMiddleware */
private $middleware;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->config = $this->createMock(IConfig::class);
diff --git a/tests/Unit/IMAP/AbstractTest.php b/tests/Unit/IMAP/AbstractTest.php
index c81a828ef..9783ba565 100644
--- a/tests/Unit/IMAP/AbstractTest.php
+++ b/tests/Unit/IMAP/AbstractTest.php
@@ -41,7 +41,7 @@ abstract class AbstractTest extends TestCase {
/** @var string[] */
private static $createdMailboxes = [];
- public static function setUpBeforeClass() {
+ public static function setUpBeforeClass(): void {
$user = 'user@domain.tld';
$password = 'mypassword';
$password = OC::$server->getCrypto()->encrypt($password);
@@ -64,7 +64,7 @@ abstract class AbstractTest extends TestCase {
self::$account->getImapConnection();
}
- public static function tearDownAfterClass() {
+ public static function tearDownAfterClass(): void {
foreach (self::$createdMailboxes as $createdMailbox) {
try {
self::deleteMailbox($createdMailbox);
diff --git a/tests/Unit/IMAP/FolderMapperTest.php b/tests/Unit/IMAP/FolderMapperTest.php
index 0df4def2b..f16fdfcc0 100644
--- a/tests/Unit/IMAP/FolderMapperTest.php
+++ b/tests/Unit/IMAP/FolderMapperTest.php
@@ -36,7 +36,7 @@ class FolderMapperTest extends TestCase {
/** @var FolderMapper */
private $mapper;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->mapper = new FolderMapper();
diff --git a/tests/Unit/IMAP/IMAPClientFactoryTest.php b/tests/Unit/IMAP/IMAPClientFactoryTest.php
index 7bce7dcd0..1cab9e634 100644
--- a/tests/Unit/IMAP/IMAPClientFactoryTest.php
+++ b/tests/Unit/IMAP/IMAPClientFactoryTest.php
@@ -46,7 +46,7 @@ class IMAPClientFactoryTest extends TestCase {
/** @var IMAPClientFactory */
private $factory;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->crypto = $this->createMock(ICrypto::class);
diff --git a/tests/Unit/IMAP/MailboxSyncTest.php b/tests/Unit/IMAP/MailboxSyncTest.php
index 522b81ae2..737a754be 100644
--- a/tests/Unit/IMAP/MailboxSyncTest.php
+++ b/tests/Unit/IMAP/MailboxSyncTest.php
@@ -60,7 +60,7 @@ class MailboxSyncTest extends TestCase {
/** @var MailboxSync */
private $sync;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->mailboxMapper = $this->createMock(MailboxMapper::class);
diff --git a/tests/Unit/IMAP/MessageMapperTest.php b/tests/Unit/IMAP/MessageMapperTest.php
index b9d892557..548cb2297 100644
--- a/tests/Unit/IMAP/MessageMapperTest.php
+++ b/tests/Unit/IMAP/MessageMapperTest.php
@@ -38,7 +38,7 @@ class MessageMapperTest extends TestCase {
/** @var MessageMapper */
private $mapper;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->logger = $this->createMock(ILogger::class);
diff --git a/tests/Unit/IMAP/Search/SearchStrategyFactoryTest.php b/tests/Unit/IMAP/Search/SearchStrategyFactoryTest.php
index 7d76ceca0..5f926125b 100644
--- a/tests/Unit/IMAP/Search/SearchStrategyFactoryTest.php
+++ b/tests/Unit/IMAP/Search/SearchStrategyFactoryTest.php
@@ -37,7 +37,7 @@ class SearchStrategyFactoryTest extends TestCase {
/** @var SearchStrategyFactory */
private $factory;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->factory = new SearchStrategyFactory();
diff --git a/tests/Unit/IMAP/Sync/FavouritesMailboxSyncTest.php b/tests/Unit/IMAP/Sync/FavouritesMailboxSyncTest.php
index 830b0aaad..290e80163 100644
--- a/tests/Unit/IMAP/Sync/FavouritesMailboxSyncTest.php
+++ b/tests/Unit/IMAP/Sync/FavouritesMailboxSyncTest.php
@@ -39,7 +39,7 @@ class FavouritesMailboxSyncTest extends TestCase {
/** @var FavouritesMailboxSync */
private $sync;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->mapper = $this->createMock(MessageMapper::class);
diff --git a/tests/Unit/IMAP/Sync/RequestTest.php b/tests/Unit/IMAP/Sync/RequestTest.php
index 9c9745ac7..902ce3a4f 100644
--- a/tests/Unit/IMAP/Sync/RequestTest.php
+++ b/tests/Unit/IMAP/Sync/RequestTest.php
@@ -35,7 +35,7 @@ class RequestTest extends TestCase {
/** @var Request */
private $request;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->mailbox = 'inbox';
diff --git a/tests/Unit/IMAP/Sync/SimpleMailboxSyncTest.php b/tests/Unit/IMAP/Sync/SimpleMailboxSyncTest.php
index d22f8189d..59aa4e2ba 100644
--- a/tests/Unit/IMAP/Sync/SimpleMailboxSyncTest.php
+++ b/tests/Unit/IMAP/Sync/SimpleMailboxSyncTest.php
@@ -48,7 +48,7 @@ class SimpleMailboxSyncTest extends TestCase {
/** @var SimpleMailboxSync */
private $sync;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->mapper = $this->createMock(MessageMapper::class);
diff --git a/tests/Unit/IMAP/Sync/SynchronizerTest.php b/tests/Unit/IMAP/Sync/SynchronizerTest.php
index 8c7b0a296..9c83d654a 100644
--- a/tests/Unit/IMAP/Sync/SynchronizerTest.php
+++ b/tests/Unit/IMAP/Sync/SynchronizerTest.php
@@ -43,7 +43,7 @@ class SynchronizerTest extends TestCase {
/** @var Synchronizer */
private $synchronizer;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->simpleSync = $this->createMock(SimpleMailboxSync::class);
diff --git a/tests/Unit/Listener/AddressCollectionListenerTest.php b/tests/Unit/Listener/AddressCollectionListenerTest.php
index c43d6b11f..a39720fe0 100644
--- a/tests/Unit/Listener/AddressCollectionListenerTest.php
+++ b/tests/Unit/Listener/AddressCollectionListenerTest.php
@@ -50,7 +50,7 @@ class AddressCollectionListenerTest extends TestCase {
/** @var IListener */
private $listener;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->addressCollector = $this->createMock(AddressCollector::class);
diff --git a/tests/Unit/Listener/DeleteDraftListenerTest.php b/tests/Unit/Listener/DeleteDraftListenerTest.php
index 601d967b6..7b68f26e3 100644
--- a/tests/Unit/Listener/DeleteDraftListenerTest.php
+++ b/tests/Unit/Listener/DeleteDraftListenerTest.php
@@ -61,7 +61,7 @@ class DeleteDraftListenerTest extends TestCase {
/** @var IEventListener */
private $listener;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->imapClientFactory = $this->createMock(IMAPClientFactory::class);
diff --git a/tests/Unit/Listener/DraftMailboxCreatorListenerTest.php b/tests/Unit/Listener/DraftMailboxCreatorListenerTest.php
index 93651894d..eb9c69b73 100644
--- a/tests/Unit/Listener/DraftMailboxCreatorListenerTest.php
+++ b/tests/Unit/Listener/DraftMailboxCreatorListenerTest.php
@@ -54,7 +54,7 @@ class DraftMailboxCreatorListenerTest extends TestCase {
/** @var DraftMailboxCreatorListener */
private $listener;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->mailboxMapper = $this->createMock(MailboxMapper::class);
diff --git a/tests/Unit/Listener/FlagRepliedMessageListenerTest.php b/tests/Unit/Listener/FlagRepliedMessageListenerTest.php
index 2824f9681..d70ad48eb 100644
--- a/tests/Unit/Listener/FlagRepliedMessageListenerTest.php
+++ b/tests/Unit/Listener/FlagRepliedMessageListenerTest.php
@@ -56,7 +56,7 @@ class FlagRepliedMessageListenerTest extends TestCase {
/** @var FlagRepliedMessageListener */
private $listener;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->imapClientFactory = $this->createMock(IMAPClientFactory::class);
diff --git a/tests/Unit/Listener/SaveSentMessageListenerTest.php b/tests/Unit/Listener/SaveSentMessageListenerTest.php
index 94ad6bad5..e6121b5c5 100644
--- a/tests/Unit/Listener/SaveSentMessageListenerTest.php
+++ b/tests/Unit/Listener/SaveSentMessageListenerTest.php
@@ -62,7 +62,7 @@ class SaveSentMessageListenerTest extends TestCase {
/** @var IListener */
private $listener;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->mailboxMapper = $this->createMock(MailboxMapper::class);
diff --git a/tests/Unit/Listener/TrashMailboxCreatorListenerTest.php b/tests/Unit/Listener/TrashMailboxCreatorListenerTest.php
index 649a4aa2d..22e86e3b2 100644
--- a/tests/Unit/Listener/TrashMailboxCreatorListenerTest.php
+++ b/tests/Unit/Listener/TrashMailboxCreatorListenerTest.php
@@ -53,7 +53,7 @@ class TrashMailboxCreatorListenerTest extends TestCase {
/** @var TrashMailboxCreatorListener */
private $listener;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->mailboxMapper = $this->createMock(MailboxMapper::class);
diff --git a/tests/Unit/Migration/FixCollectedAddressesTest.php b/tests/Unit/Migration/FixCollectedAddressesTest.php
index 9c8d893ad..0c0ae04d9 100644
--- a/tests/Unit/Migration/FixCollectedAddressesTest.php
+++ b/tests/Unit/Migration/FixCollectedAddressesTest.php
@@ -41,7 +41,7 @@ class FixCollectedAddressesTest extends TestCase {
/** @var FixCollectedAddresses */
private $repairStep;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->mapper = $this->createMock(CollectedAddressMapper::class);
diff --git a/tests/Unit/Model/MessageTest.php b/tests/Unit/Model/MessageTest.php
index 4d108df2b..675831903 100644
--- a/tests/Unit/Model/MessageTest.php
+++ b/tests/Unit/Model/MessageTest.php
@@ -31,7 +31,7 @@ class MessageTest extends TestCase {
protected $message;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->message = new Message();
diff --git a/tests/Unit/SMTP/SmtpClientFactoryTest.php b/tests/Unit/SMTP/SmtpClientFactoryTest.php
index 9e2e30cc5..a26630bb5 100644
--- a/tests/Unit/SMTP/SmtpClientFactoryTest.php
+++ b/tests/Unit/SMTP/SmtpClientFactoryTest.php
@@ -49,7 +49,7 @@ class SmtpClientFactoryTest extends TestCase {
/** @var SmtpClientFactory */
private $factory;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->config = $this->createMock(IConfig::class);
diff --git a/tests/Unit/Service/AccountServiceTest.php b/tests/Unit/Service/AccountServiceTest.php
index f3f6bf6ab..887659b21 100644
--- a/tests/Unit/Service/AccountServiceTest.php
+++ b/tests/Unit/Service/AccountServiceTest.php
@@ -57,7 +57,7 @@ class AccountServiceTest extends TestCase {
/** @var Manager|PHPUnit_Framework_MockObject_MockObject */
private $defaultAccountManager;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->mapper = $this->createMock(MailAccountMapper::class);
diff --git a/tests/Unit/Service/AliasesServiceTest.php b/tests/Unit/Service/AliasesServiceTest.php
index 8bbe42c78..5da2a7344 100644
--- a/tests/Unit/Service/AliasesServiceTest.php
+++ b/tests/Unit/Service/AliasesServiceTest.php
@@ -41,7 +41,7 @@ class AliasesServiceTest extends TestCase {
/** @var Alias|PHPUnit_Framework_MockObject_MockObject */
private $alias;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->mapper = $this->createMock(AliasMapper::class);
diff --git a/tests/Unit/Service/Attachment/AttachmentServiceTest.php b/tests/Unit/Service/Attachment/AttachmentServiceTest.php
index f2d9483cc..deff97cb8 100644
--- a/tests/Unit/Service/Attachment/AttachmentServiceTest.php
+++ b/tests/Unit/Service/Attachment/AttachmentServiceTest.php
@@ -41,7 +41,7 @@ class AttachmentServiceTest extends TestCase {
/** @var AttachmentService */
private $service;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->mapper = $this->createMock(LocalAttachmentMapper::class);
diff --git a/tests/Unit/Service/Attachment/AttachmentStorageTest.php b/tests/Unit/Service/Attachment/AttachmentStorageTest.php
index d45d846f5..95089590b 100644
--- a/tests/Unit/Service/Attachment/AttachmentStorageTest.php
+++ b/tests/Unit/Service/Attachment/AttachmentStorageTest.php
@@ -42,7 +42,7 @@ class AttachmentStorageTest extends TestCase {
/** @var AttachmentStorage */
private $storage;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
file_put_contents($this->tmpFilePath, 'test test');
diff --git a/tests/Unit/Service/Autocompletion/AddressCollectorTest.php b/tests/Unit/Service/Autocompletion/AddressCollectorTest.php
index cd0797e87..0b387896b 100644
--- a/tests/Unit/Service/Autocompletion/AddressCollectorTest.php
+++ b/tests/Unit/Service/Autocompletion/AddressCollectorTest.php
@@ -34,7 +34,7 @@ class AddressCollectorTest extends TestCase {
private $logger;
private $collector;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->mapper = $this->getMockBuilder('\OCA\Mail\Db\CollectedAddressMapper')
diff --git a/tests/Unit/Service/Autocompletion/AutoCompleteServiceTest.php b/tests/Unit/Service/Autocompletion/AutoCompleteServiceTest.php
index f82b976df..9bd24bec7 100644
--- a/tests/Unit/Service/Autocompletion/AutoCompleteServiceTest.php
+++ b/tests/Unit/Service/Autocompletion/AutoCompleteServiceTest.php
@@ -36,7 +36,7 @@ class AutoCompleteServiceTest extends TestCase {
private $addressCollector;
private $service;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->contactsIntegration = $this->createMock(ContactsIntegration::class);
diff --git a/tests/Unit/Service/Autoconfig/AutoConfigTest.php b/tests/Unit/Service/Autoconfig/AutoConfigTest.php
index fd6fb710d..fe58d7013 100644
--- a/tests/Unit/Service/Autoconfig/AutoConfigTest.php
+++ b/tests/Unit/Service/Autoconfig/AutoConfigTest.php
@@ -42,7 +42,7 @@ class AutoConfigTest extends TestCase {
/** @var AutoConfig */
private $autoConfig;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->ispDbDetector = $this->createMock(IspDbConfigurationDetector::class);
diff --git a/tests/Unit/Service/Autoconfig/ConfigurationDetectorTest.php b/tests/Unit/Service/Autoconfig/ConfigurationDetectorTest.php
index a7aee3ae5..dcc92a433 100644
--- a/tests/Unit/Service/Autoconfig/ConfigurationDetectorTest.php
+++ b/tests/Unit/Service/Autoconfig/ConfigurationDetectorTest.php
@@ -42,7 +42,7 @@ class ConfigurationDetectorTest extends TestCase {
/** @var ConfigurationDetector */
private $detector;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->imapServerDetector = $this->createMock(ImapServerDetector::class);
diff --git a/tests/Unit/Service/Autoconfig/ConnectivityTesterTest.php b/tests/Unit/Service/Autoconfig/ConnectivityTesterTest.php
index 35b3c055f..d7f636fc6 100644
--- a/tests/Unit/Service/Autoconfig/ConnectivityTesterTest.php
+++ b/tests/Unit/Service/Autoconfig/ConnectivityTesterTest.php
@@ -34,7 +34,7 @@ class ConnectivityTesterTest extends TestCase {
/** @var ConnectivityTester */
private $tester;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->logger = $this->createMock(ILogger::class);
diff --git a/tests/Unit/Service/Autoconfig/ImapConnectivityTesterTest.php b/tests/Unit/Service/Autoconfig/ImapConnectivityTesterTest.php
index b882352dc..6b1350513 100644
--- a/tests/Unit/Service/Autoconfig/ImapConnectivityTesterTest.php
+++ b/tests/Unit/Service/Autoconfig/ImapConnectivityTesterTest.php
@@ -44,7 +44,7 @@ class ImapConnectivityTesterTest extends TestCase {
/** @var ImapConnectivityTester */
private $tester;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->imapConnector = $this->createMock(ImapConnector::class);
diff --git a/tests/Unit/Service/Autoconfig/ImapConnectorTest.php b/tests/Unit/Service/Autoconfig/ImapConnectorTest.php
index c43353891..283ae653d 100644
--- a/tests/Unit/Service/Autoconfig/ImapConnectorTest.php
+++ b/tests/Unit/Service/Autoconfig/ImapConnectorTest.php
@@ -47,7 +47,7 @@ class ImapConnectorTest extends TestCase {
/** @var ImapConnector */
private $connector;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->crypto = $this->createMock(ICrypto::class);
diff --git a/tests/Unit/Service/Autoconfig/ImapServerDetectorTest.php b/tests/Unit/Service/Autoconfig/ImapServerDetectorTest.php
index 374f28367..28d98b483 100644
--- a/tests/Unit/Service/Autoconfig/ImapServerDetectorTest.php
+++ b/tests/Unit/Service/Autoconfig/ImapServerDetectorTest.php
@@ -39,7 +39,7 @@ class ImapServerDetectorTest extends TestCase {
/** @var ImapServerDetector */
private $detector;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->mxRecord = $this->createMock(MxRecord::class);
diff --git a/tests/Unit/Service/Autoconfig/IspDbTest.php b/tests/Unit/Service/Autoconfig/IspDbTest.php
index ea04f1504..9e765948c 100644
--- a/tests/Unit/Service/Autoconfig/IspDbTest.php
+++ b/tests/Unit/Service/Autoconfig/IspDbTest.php
@@ -30,7 +30,7 @@ class IspDbtest extends TestCase {
private $logger;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->logger = $this->getMockBuilder(ILogger::class)
diff --git a/tests/Unit/Service/Autoconfig/MxRecordTest.php b/tests/Unit/Service/Autoconfig/MxRecordTest.php
index 6172707fb..560ffdb73 100644
--- a/tests/Unit/Service/Autoconfig/MxRecordTest.php
+++ b/tests/Unit/Service/Autoconfig/MxRecordTest.php
@@ -30,7 +30,7 @@ class MxRecordTest extends TestCase {
/** @var MxRecord */
private $record;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$logger = $this->createMock(ILogger::class);
@@ -40,7 +40,7 @@ class MxRecordTest extends TestCase {
public function testQuery() {
$records = $this->record->query('nextcloud.com');
- $this->assertInternalType('array', $records);
+ $this->assertIsArray($records);
$this->assertNotEmpty($records);
}
diff --git a/tests/Unit/Service/Autoconfig/SmtpConnectivityTesterTest.php b/tests/Unit/Service/Autoconfig/SmtpConnectivityTesterTest.php
index b4fba1b81..d82b99a55 100644
--- a/tests/Unit/Service/Autoconfig/SmtpConnectivityTesterTest.php
+++ b/tests/Unit/Service/Autoconfig/SmtpConnectivityTesterTest.php
@@ -49,7 +49,7 @@ class SmtpConnectivityTesterTest extends TestCase {
/** @var SmtpConnectivityTester */
private $tester;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->connectivityTester = $this->createMock(ConnectivityTester::class);
diff --git a/tests/Unit/Service/Autoconfig/SmtpServerDetectorTest.php b/tests/Unit/Service/Autoconfig/SmtpServerDetectorTest.php
index 45eaf3aea..3179c6e14 100644
--- a/tests/Unit/Service/Autoconfig/SmtpServerDetectorTest.php
+++ b/tests/Unit/Service/Autoconfig/SmtpServerDetectorTest.php
@@ -39,7 +39,7 @@ class SmtpServerDetectorTest extends TestCase {
/** @var SmtpServerDetector */
private $detector;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->mxRecord = $this->createMock(MxRecord::class);
diff --git a/tests/Unit/Service/Avatar/AddressbookSourceTest.php b/tests/Unit/Service/Avatar/AddressbookSourceTest.php
index d7bd6657a..c20958afb 100644
--- a/tests/Unit/Service/Avatar/AddressbookSourceTest.php
+++ b/tests/Unit/Service/Avatar/AddressbookSourceTest.php
@@ -39,7 +39,7 @@ class AddressbookSourceTest extends TestCase {
/** @var AddressbookSource */
private $source;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->ci = $this->createMock(ContactsIntegration::class);
diff --git a/tests/Unit/Service/Avatar/CacheTest.php b/tests/Unit/Service/Avatar/CacheTest.php
index d8e0a9dca..36b76c121 100644
--- a/tests/Unit/Service/Avatar/CacheTest.php
+++ b/tests/Unit/Service/Avatar/CacheTest.php
@@ -48,7 +48,7 @@ class CacheTest extends TestCase {
/** @var Cache */
private $cache;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->cacheFactory = $this->createMock(ICacheFactory::class);
diff --git a/tests/Unit/Service/Avatar/CompositeAvatarSourceTest.php b/tests/Unit/Service/Avatar/CompositeAvatarSourceTest.php
index bc02dcf83..c4573537a 100644
--- a/tests/Unit/Service/Avatar/CompositeAvatarSourceTest.php
+++ b/tests/Unit/Service/Avatar/CompositeAvatarSourceTest.php
@@ -47,7 +47,7 @@ class CompositeAvatarSourceTest extends TestCase {
/** @var CompositeAvatarSource */
private $source;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->addressbookSource = $this->createMock(AddressbookSource::class);
diff --git a/tests/Unit/Service/Avatar/DownloaderTest.php b/tests/Unit/Service/Avatar/DownloaderTest.php
index 7d9e5808c..be669eedd 100644
--- a/tests/Unit/Service/Avatar/DownloaderTest.php
+++ b/tests/Unit/Service/Avatar/DownloaderTest.php
@@ -40,7 +40,7 @@ class DownloaderTest extends TestCase {
/** @var Downloader */
private $downloader;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->clientService = $this->createMock(IClientService::class);
diff --git a/tests/Unit/Service/Avatar/FaviconSourceTest.php b/tests/Unit/Service/Avatar/FaviconSourceTest.php
index d52aa4034..5213f0211 100644
--- a/tests/Unit/Service/Avatar/FaviconSourceTest.php
+++ b/tests/Unit/Service/Avatar/FaviconSourceTest.php
@@ -50,7 +50,7 @@ class FaviconSourceTest extends TestCase {
/** @var FaviconSource */
private $source;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->clientService = $this->createMock(IClientService::class);
diff --git a/tests/Unit/Service/Avatar/GravatarSouceTest.php b/tests/Unit/Service/Avatar/GravatarSouceTest.php
index c0e99e727..ced023b4d 100644
--- a/tests/Unit/Service/Avatar/GravatarSouceTest.php
+++ b/tests/Unit/Service/Avatar/GravatarSouceTest.php
@@ -42,7 +42,7 @@ class GravatarSourceTest extends TestCase {
/** @var GravatarSource */
private $source;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->clientService = $this->createMock(IClientService::class);
diff --git a/tests/Unit/Service/AvatarServiceTest.php b/tests/Unit/Service/AvatarServiceTest.php
index 7acef6b42..83144dd0e 100644
--- a/tests/Unit/Service/AvatarServiceTest.php
+++ b/tests/Unit/Service/AvatarServiceTest.php
@@ -61,7 +61,7 @@ class AvatarServiceTest extends TestCase {
/** @var AvatarService */
private $avatarService;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->source = $this->createMock(CompositeAvatarSource::class);
diff --git a/tests/Unit/Service/ContactsIntegrationTest.php b/tests/Unit/Service/ContactsIntegrationTest.php
index c419321f0..1041d8c21 100644
--- a/tests/Unit/Service/ContactsIntegrationTest.php
+++ b/tests/Unit/Service/ContactsIntegrationTest.php
@@ -37,7 +37,7 @@ class ContactsIntegrationTest extends TestCase {
/** @var ContactsIntegration */
private $contactsIntegration;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->contactsManager = $this->createMock(IManager::class);
diff --git a/tests/Unit/Service/DefaultAccount/ManagerTest.php b/tests/Unit/Service/DefaultAccount/ManagerTest.php
index 0488ccb80..4e2ab7bbb 100644
--- a/tests/Unit/Service/DefaultAccount/ManagerTest.php
+++ b/tests/Unit/Service/DefaultAccount/ManagerTest.php
@@ -54,7 +54,7 @@ class ManagerTest extends TestCase {
/** @var Manager|PHPUnit_Framework_MockObject_MockObject */
private $manager;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->config = $this->createMock(IConfig::class);
diff --git a/tests/Unit/Service/Group/NextcloudGroupServiceTest.php b/tests/Unit/Service/Group/NextcloudGroupServiceTest.php
index 3c0ddc0d8..43df1f067 100644
--- a/tests/Unit/Service/Group/NextcloudGroupServiceTest.php
+++ b/tests/Unit/Service/Group/NextcloudGroupServiceTest.php
@@ -33,7 +33,7 @@ class NextcloudGroupServiceTest extends TestCase {
private $groupsManager;
private $groupService;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->groupsManager = $this->createMock(IGroupManager::class);
@@ -97,7 +97,7 @@ class NextcloudGroupServiceTest extends TestCase {
}
public function testGetUsers() {
- $users = [
+ $users = [
$this->createTestUser('bob', 'Bobby', 'bob@smith.net'),
$this->createTestUser('alice', 'Alice', 'alice@smith.net')
];
diff --git a/tests/Unit/Service/GroupsIntegrationTest.php b/tests/Unit/Service/GroupsIntegrationTest.php
index 8801ef5fd..758c93846 100644
--- a/tests/Unit/Service/GroupsIntegrationTest.php
+++ b/tests/Unit/Service/GroupsIntegrationTest.php
@@ -35,7 +35,7 @@ class GroupsIntegrationTest extends TestCase {
/** @var GroupsIntegration */
private $groupsIntegration;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->groupService1 = $this->createMock(NextcloudGroupService::class);
diff --git a/tests/Unit/Service/MailManagerTest.php b/tests/Unit/Service/MailManagerTest.php
index 5cd26df6d..f6bd644b2 100644
--- a/tests/Unit/Service/MailManagerTest.php
+++ b/tests/Unit/Service/MailManagerTest.php
@@ -68,7 +68,7 @@ class MailManagerTest extends TestCase {
/** @var MailManager */
private $manager;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->imapClientFactory = $this->createMock(IMAPClientFactory::class);
diff --git a/tests/Unit/Service/MailSearchTest.php b/tests/Unit/Service/MailSearchTest.php
index dd0df6fd7..fc4483307 100644
--- a/tests/Unit/Service/MailSearchTest.php
+++ b/tests/Unit/Service/MailSearchTest.php
@@ -55,7 +55,7 @@ class MailSearchTest extends TestCase {
/** @var MailSearch */
private $search;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->imapClientFactory = $this->createMock(IMAPClientFactory::class);
diff --git a/tests/Unit/Service/MailTransmissionTest.php b/tests/Unit/Service/MailTransmissionTest.php
index 64d0fa6d4..ed1ab301b 100644
--- a/tests/Unit/Service/MailTransmissionTest.php
+++ b/tests/Unit/Service/MailTransmissionTest.php
@@ -73,7 +73,7 @@ class MailTransmissionTest extends TestCase {
/** @var MailTransmission */
private $transmission;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->userFolder = $this->createMock(Folder::class);
diff --git a/tests/Unit/Service/SetupServiceTest.php b/tests/Unit/Service/SetupServiceTest.php
index 7a5285909..dce28ac37 100644
--- a/tests/Unit/Service/SetupServiceTest.php
+++ b/tests/Unit/Service/SetupServiceTest.php
@@ -55,7 +55,7 @@ class SetupServiceTest extends TestCase {
/** @var SetupService */
private $service;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->autoConfig = $this->createMock(AutoConfig::class);
diff --git a/tests/Unit/Service/UserPreferenceServiceTest.php b/tests/Unit/Service/UserPreferenceServiceTest.php
index 592517b11..7c13070b3 100644
--- a/tests/Unit/Service/UserPreferenceServiceTest.php
+++ b/tests/Unit/Service/UserPreferenceServiceTest.php
@@ -39,7 +39,7 @@ class UserPreferenceServiceTest extends TestCase {
/** @var UserPreferenceSevice */
private $service;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->config = $this->createMock(IConfig::class);
diff --git a/tests/Unit/Support/HostNameFactoryTest.php b/tests/Unit/Support/HostNameFactoryTest.php
index 21880855d..3f39e7541 100644
--- a/tests/Unit/Support/HostNameFactoryTest.php
+++ b/tests/Unit/Support/HostNameFactoryTest.php
@@ -35,7 +35,7 @@ class HostNameFactoryTest extends TestCase {
/** @var HostNameFactory */
private $factory;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->factory = new HostNameFactory();