From 2c76665cf4551529ea2c81b6d1e51fce2a7a834a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2019 14:11:00 +0000 Subject: 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] Signed-off-by: Christoph Wurst --- composer.json | 2 +- composer.lock | 164 +++++++++++++-------- tests/HordeTranslationHandlerTest.php | 2 +- tests/Integration/FolderSynchronizationTest.php | 2 +- tests/Integration/Framework/SelfTest.php | 2 +- .../Service/AvatarServiceIntegrationTest.php | 2 +- .../Service/FolderMapperIntegrationTest.php | 2 +- .../Service/MailTransmissionIntegrationTest.php | 2 +- tests/Integration/TestCase.php | 2 +- tests/SearchFolderTest.php | 2 +- tests/Unit/Command/CreateAccountTest.php | 2 +- tests/Unit/Controller/AccountsControllerTest.php | 51 +++---- tests/Unit/Controller/AliasesControllerTest.php | 2 +- tests/Unit/Controller/AutoconfigControllerTest.php | 2 +- tests/Unit/Controller/AvatarControllerTest.php | 4 +- tests/Unit/Controller/FoldersControllerTest.php | 2 +- .../Controller/LocalAttachmentsControllerTest.php | 2 +- tests/Unit/Controller/MessagesControllerTest.php | 4 +- tests/Unit/Controller/PageControllerTest.php | 2 +- .../Unit/Controller/PreferencesControllerTest.php | 2 +- tests/Unit/Controller/ProxyControllerTest.php | 7 +- tests/Unit/Db/AliasMapperTest.php | 4 +- tests/Unit/Db/CollectedAddressMapperTest.php | 2 +- tests/Unit/Db/MailAccountMapperTest.php | 2 +- tests/Unit/Db/MailboxMapperTest.php | 2 +- tests/Unit/Http/Middleware/ErrorMiddlewareTest.php | 2 +- tests/Unit/IMAP/AbstractTest.php | 4 +- tests/Unit/IMAP/FolderMapperTest.php | 2 +- tests/Unit/IMAP/IMAPClientFactoryTest.php | 2 +- tests/Unit/IMAP/MailboxSyncTest.php | 2 +- tests/Unit/IMAP/MessageMapperTest.php | 2 +- .../Unit/IMAP/Search/SearchStrategyFactoryTest.php | 2 +- tests/Unit/IMAP/Sync/FavouritesMailboxSyncTest.php | 2 +- tests/Unit/IMAP/Sync/RequestTest.php | 2 +- tests/Unit/IMAP/Sync/SimpleMailboxSyncTest.php | 2 +- tests/Unit/IMAP/Sync/SynchronizerTest.php | 2 +- .../Listener/AddressCollectionListenerTest.php | 2 +- tests/Unit/Listener/DeleteDraftListenerTest.php | 2 +- .../Listener/DraftMailboxCreatorListenerTest.php | 2 +- .../Listener/FlagRepliedMessageListenerTest.php | 2 +- .../Unit/Listener/SaveSentMessageListenerTest.php | 2 +- .../Listener/TrashMailboxCreatorListenerTest.php | 2 +- tests/Unit/Migration/FixCollectedAddressesTest.php | 2 +- tests/Unit/Model/MessageTest.php | 2 +- tests/Unit/SMTP/SmtpClientFactoryTest.php | 2 +- tests/Unit/Service/AccountServiceTest.php | 2 +- tests/Unit/Service/AliasesServiceTest.php | 2 +- .../Service/Attachment/AttachmentServiceTest.php | 2 +- .../Service/Attachment/AttachmentStorageTest.php | 2 +- .../Autocompletion/AddressCollectorTest.php | 2 +- .../Autocompletion/AutoCompleteServiceTest.php | 2 +- tests/Unit/Service/Autoconfig/AutoConfigTest.php | 2 +- .../Autoconfig/ConfigurationDetectorTest.php | 2 +- .../Service/Autoconfig/ConnectivityTesterTest.php | 2 +- .../Autoconfig/ImapConnectivityTesterTest.php | 2 +- .../Unit/Service/Autoconfig/ImapConnectorTest.php | 2 +- .../Service/Autoconfig/ImapServerDetectorTest.php | 2 +- tests/Unit/Service/Autoconfig/IspDbTest.php | 2 +- tests/Unit/Service/Autoconfig/MxRecordTest.php | 4 +- .../Autoconfig/SmtpConnectivityTesterTest.php | 2 +- .../Service/Autoconfig/SmtpServerDetectorTest.php | 2 +- .../Unit/Service/Avatar/AddressbookSourceTest.php | 2 +- tests/Unit/Service/Avatar/CacheTest.php | 2 +- .../Service/Avatar/CompositeAvatarSourceTest.php | 2 +- tests/Unit/Service/Avatar/DownloaderTest.php | 2 +- tests/Unit/Service/Avatar/FaviconSourceTest.php | 2 +- tests/Unit/Service/Avatar/GravatarSouceTest.php | 2 +- tests/Unit/Service/AvatarServiceTest.php | 2 +- tests/Unit/Service/ContactsIntegrationTest.php | 2 +- tests/Unit/Service/DefaultAccount/ManagerTest.php | 2 +- .../Service/Group/NextcloudGroupServiceTest.php | 4 +- tests/Unit/Service/GroupsIntegrationTest.php | 2 +- tests/Unit/Service/MailManagerTest.php | 2 +- tests/Unit/Service/MailSearchTest.php | 2 +- tests/Unit/Service/MailTransmissionTest.php | 2 +- tests/Unit/Service/SetupServiceTest.php | 2 +- tests/Unit/Service/UserPreferenceServiceTest.php | 2 +- tests/Unit/Support/HostNameFactoryTest.php | 2 +- 78 files changed, 214 insertions(+), 170 deletions(-) diff --git a/composer.json b/composer.json index 27881077b..5c16e1b8e 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ }, "require-dev": { "christophwurst/nextcloud": "v17.0.1", - "christophwurst/nextcloud_testing": "0.7.0", + "christophwurst/nextcloud_testing": "0.9.1", "phan/phan": "^2.0" }, "scripts": { diff --git a/composer.lock b/composer.lock index 8340a2839..4a2660733 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "882d8a1a1e058f2b58d39670fae5ddfa", + "content-hash": "29cb0356b050b01e283ff4468f9a2c74", "packages": [ { "name": "arthurhoaro/favicon", @@ -893,21 +893,21 @@ }, { "name": "christophwurst/nextcloud_testing", - "version": "0.7.0", + "version": "0.9.1", "source": { "type": "git", "url": "https://github.com/ChristophWurst/nextcloud_testing.git", - "reference": "5d6c5cb4090fbe7bee015f8ee47b1baaf1f0f7af" + "reference": "ffe5d2df7e49696d080d2de9005730db163de787" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ChristophWurst/nextcloud_testing/zipball/5d6c5cb4090fbe7bee015f8ee47b1baaf1f0f7af", - "reference": "5d6c5cb4090fbe7bee015f8ee47b1baaf1f0f7af", + "url": "https://api.github.com/repos/ChristophWurst/nextcloud_testing/zipball/ffe5d2df7e49696d080d2de9005730db163de787", + "reference": "ffe5d2df7e49696d080d2de9005730db163de787", "shasum": "" }, "require": { "facebook/webdriver": "^1.7", - "phpunit/phpunit": "^7.5" + "phpunit/phpunit": "^8.0" }, "require-dev": { "christophwurst/nextcloud": "^15.0" @@ -929,7 +929,7 @@ } ], "description": "Simple and fast unit and integration testing framework for Nextcloud, based on PHPUnit", - "time": "2019-08-08T09:38:30+00:00" + "time": "2019-12-02T11:44:23+00:00" }, { "name": "composer/semver", @@ -1719,40 +1719,40 @@ }, { "name": "phpunit/php-code-coverage", - "version": "6.1.4", + "version": "7.0.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" + "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf", + "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^2.0", + "php": "^7.2", + "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", + "phpunit/php-token-stream": "^3.1.1", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1 || ^4.0", + "sebastian/environment": "^4.2.2", "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" + "theseer/tokenizer": "^1.1.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^8.2.2" }, "suggest": { - "ext-xdebug": "^2.6.0" + "ext-xdebug": "^2.7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1-dev" + "dev-master": "7.0-dev" } }, "autoload": { @@ -1778,7 +1778,7 @@ "testing", "xunit" ], - "time": "2018-10-31T16:06:48+00:00" + "time": "2019-11-20T13:55:58+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1971,53 +1971,52 @@ }, { "name": "phpunit/phpunit", - "version": "7.5.17", + "version": "8.4.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "4c92a15296e58191a4cd74cff3b34fc8e374174a" + "reference": "67f9e35bffc0dd52d55d565ddbe4230454fd6a4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4c92a15296e58191a4cd74cff3b34fc8e374174a", - "reference": "4c92a15296e58191a4cd74cff3b34fc8e374174a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/67f9e35bffc0dd52d55d565ddbe4230454fd6a4e", + "reference": "67f9e35bffc0dd52d55d565ddbe4230454fd6a4e", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.1", + "doctrine/instantiator": "^1.2.0", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.2", - "phar-io/version": "^2.0", - "php": "^7.1", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.7", - "phpunit/php-file-iterator": "^2.0.1", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.9.1", + "phar-io/manifest": "^1.0.3", + "phar-io/version": "^2.0.1", + "php": "^7.2", + "phpspec/prophecy": "^1.8.1", + "phpunit/php-code-coverage": "^7.0.7", + "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0", - "sebastian/environment": "^4.0", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.2", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.2", + "sebastian/exporter": "^3.1.1", + "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", "sebastian/version": "^2.0.1" }, - "conflict": { - "phpunit/phpunit-mock-objects": "*" - }, "require-dev": { "ext-pdo": "*" }, "suggest": { "ext-soap": "*", "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" + "phpunit/php-invoker": "^2.0.0" }, "bin": [ "phpunit" @@ -2025,7 +2024,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.5-dev" + "dev-master": "8.4-dev" } }, "autoload": { @@ -2051,7 +2050,7 @@ "testing", "xunit" ], - "time": "2019-10-28T10:37:36+00:00" + "time": "2019-11-06T09:42:23+00:00" }, { "name": "psr/container", @@ -2496,23 +2495,26 @@ }, { "name": "sebastian/global-state", - "version": "2.0.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "ext-dom": "*", + "phpunit/phpunit": "^8.0" }, "suggest": { "ext-uopz": "*" @@ -2520,7 +2522,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -2543,7 +2545,7 @@ "keywords": [ "global state" ], - "time": "2017-04-27T15:39:26+00:00" + "time": "2019-02-01T05:30:01+00:00" }, { "name": "sebastian/object-enumerator", @@ -2732,6 +2734,52 @@ "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "time": "2018-10-04T04:07:39+00:00" }, + { + "name": "sebastian/type", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", + "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", + "shasum": "" + }, + "require": { + "php": "^7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "time": "2019-07-02T08:10:15+00:00" + }, { "name": "sebastian/version", "version": "2.0.1", @@ -3028,16 +3076,16 @@ }, { "name": "symfony/process", - "version": "v4.4.0", + "version": "v4.4.1", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "75ad33d9b6f25325ebc396d68ad86fd74bcfbb06" + "reference": "51c0135ef3f44c5803b33dc60e96bf4f77752726" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/75ad33d9b6f25325ebc396d68ad86fd74bcfbb06", - "reference": "75ad33d9b6f25325ebc396d68ad86fd74bcfbb06", + "url": "https://api.github.com/repos/symfony/process/zipball/51c0135ef3f44c5803b33dc60e96bf4f77752726", + "reference": "51c0135ef3f44c5803b33dc60e96bf4f77752726", "shasum": "" }, "require": { @@ -3073,7 +3121,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2019-10-28T20:30:34+00:00" + "time": "2019-11-28T13:33:56+00:00" }, { "name": "symfony/service-contracts", 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 @@ - @@ -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" , 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(); -- cgit v1.2.3