diff --git a/apps/admin_audit/tests/Actions/SecurityTest.php b/apps/admin_audit/tests/Actions/SecurityTest.php index 3a3f25933f..c729545248 100644 --- a/apps/admin_audit/tests/Actions/SecurityTest.php +++ b/apps/admin_audit/tests/Actions/SecurityTest.php @@ -39,7 +39,7 @@ class SecurityTest extends TestCase { /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */ private $user; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->logger = $this->createMock(ILogger::class); diff --git a/apps/comments/tests/Unit/Activity/ListenerTest.php b/apps/comments/tests/Unit/Activity/ListenerTest.php index 4454101bb3..162cd2eb74 100644 --- a/apps/comments/tests/Unit/Activity/ListenerTest.php +++ b/apps/comments/tests/Unit/Activity/ListenerTest.php @@ -63,7 +63,7 @@ class ListenerTest extends TestCase { /** @var IShareHelper|\PHPUnit_Framework_MockObject_MockObject */ protected $shareHelper; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->activityManager = $this->createMock(IManager::class); diff --git a/apps/comments/tests/Unit/AppInfo/ApplicationTest.php b/apps/comments/tests/Unit/AppInfo/ApplicationTest.php index 6ff3bc54b0..2117b79350 100644 --- a/apps/comments/tests/Unit/AppInfo/ApplicationTest.php +++ b/apps/comments/tests/Unit/AppInfo/ApplicationTest.php @@ -35,13 +35,13 @@ use Test\TestCase; * @package OCA\Comments\Tests\Unit\AppInfo */ class ApplicationTest extends TestCase { - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC::$server->getUserManager()->createUser('dummy', '456'); \OC::$server->getUserSession()->setUser(\OC::$server->getUserManager()->get('dummy')); } - protected function tearDown() { + protected function tearDown(): void { \OC::$server->getUserManager()->get('dummy')->delete(); parent::tearDown(); } diff --git a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php index 0cc3e3d4b6..727014b8fc 100644 --- a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php +++ b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php @@ -36,7 +36,7 @@ class CommentersSorterTest extends TestCase { /** @var CommentersSorter */ protected $sorter; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->commentsManager = $this->createMock(ICommentsManager::class); diff --git a/apps/comments/tests/Unit/Controller/NotificationsTest.php b/apps/comments/tests/Unit/Controller/NotificationsTest.php index 9df81f01b0..029a04dcb8 100644 --- a/apps/comments/tests/Unit/Controller/NotificationsTest.php +++ b/apps/comments/tests/Unit/Controller/NotificationsTest.php @@ -59,7 +59,7 @@ class NotificationsTest extends TestCase { /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ protected $urlGenerator; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->commentsManager = $this->createMock(ICommentsManager::class); diff --git a/apps/comments/tests/Unit/EventHandlerTest.php b/apps/comments/tests/Unit/EventHandlerTest.php index b27b851cc5..c9841a553f 100644 --- a/apps/comments/tests/Unit/EventHandlerTest.php +++ b/apps/comments/tests/Unit/EventHandlerTest.php @@ -40,7 +40,7 @@ class EventHandlerTest extends TestCase { /** @var NotificationListener|\PHPUnit_Framework_MockObject_MockObject */ protected $notificationListener; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->activityListener = $this->getMockBuilder(ActivityListener::class) diff --git a/apps/comments/tests/Unit/JSSettingsHelperTest.php b/apps/comments/tests/Unit/JSSettingsHelperTest.php index ad2f34c7aa..4133daef3c 100644 --- a/apps/comments/tests/Unit/JSSettingsHelperTest.php +++ b/apps/comments/tests/Unit/JSSettingsHelperTest.php @@ -34,7 +34,7 @@ class JSSettingsHelperTest extends TestCase { /** @var JSSettingsHelper */ protected $helper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->c = $this->createMock(IServerContainer::class); diff --git a/apps/comments/tests/Unit/Notification/ListenerTest.php b/apps/comments/tests/Unit/Notification/ListenerTest.php index e31b227bce..8d89206268 100644 --- a/apps/comments/tests/Unit/Notification/ListenerTest.php +++ b/apps/comments/tests/Unit/Notification/ListenerTest.php @@ -46,7 +46,7 @@ class ListenerTest extends TestCase { /** @var Listener */ protected $listener; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->notificationManager = $this->createMock(\OCP\Notification\IManager::class); diff --git a/apps/comments/tests/Unit/Notification/NotifierTest.php b/apps/comments/tests/Unit/Notification/NotifierTest.php index d008c4c312..1fb1cd7736 100644 --- a/apps/comments/tests/Unit/Notification/NotifierTest.php +++ b/apps/comments/tests/Unit/Notification/NotifierTest.php @@ -62,7 +62,7 @@ class NotifierTest extends TestCase { /** @var string */ protected $lc = 'tlh_KX'; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->l10nFactory = $this->createMock(IFactory::class); diff --git a/apps/dav/tests/unit/Avatars/AvatarHomeTest.php b/apps/dav/tests/unit/Avatars/AvatarHomeTest.php index 07eb967027..e5a2bfa862 100644 --- a/apps/dav/tests/unit/Avatars/AvatarHomeTest.php +++ b/apps/dav/tests/unit/Avatars/AvatarHomeTest.php @@ -40,7 +40,7 @@ class AvatarHomeTest extends TestCase { /** @var IAvatarManager | \PHPUnit_Framework_MockObject_MockObject */ private $avatarManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->avatarManager = $this->createMock(IAvatarManager::class); $this->home = new AvatarHome(['uri' => 'principals/users/admin'], $this->avatarManager); diff --git a/apps/dav/tests/unit/BackgroundJob/CleanupInvitationTokenJobTest.php b/apps/dav/tests/unit/BackgroundJob/CleanupInvitationTokenJobTest.php index 2d80b5bf0e..b516e26a8c 100644 --- a/apps/dav/tests/unit/BackgroundJob/CleanupInvitationTokenJobTest.php +++ b/apps/dav/tests/unit/BackgroundJob/CleanupInvitationTokenJobTest.php @@ -41,7 +41,7 @@ class CleanupInvitationTokenJobTest extends TestCase { /** @var \OCA\DAV\BackgroundJob\GenerateBirthdayCalendarBackgroundJob */ private $backgroundJob; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->dbConnection = $this->createMock(IDBConnection::class); diff --git a/apps/dav/tests/unit/BackgroundJob/EventReminderJobTest.php b/apps/dav/tests/unit/BackgroundJob/EventReminderJobTest.php index c3b4b7e54c..c55ffcf72c 100644 --- a/apps/dav/tests/unit/BackgroundJob/EventReminderJobTest.php +++ b/apps/dav/tests/unit/BackgroundJob/EventReminderJobTest.php @@ -40,7 +40,7 @@ class EventReminderJobTest extends TestCase { /** @var EventReminderJob|\PHPUnit\Framework\MockObject\MockObject */ private $backgroundJob; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->reminderService = $this->createMock(ReminderService::class); diff --git a/apps/dav/tests/unit/BackgroundJob/GenerateBirthdayCalendarBackgroundJobTest.php b/apps/dav/tests/unit/BackgroundJob/GenerateBirthdayCalendarBackgroundJobTest.php index acf1306a63..f00d083b79 100644 --- a/apps/dav/tests/unit/BackgroundJob/GenerateBirthdayCalendarBackgroundJobTest.php +++ b/apps/dav/tests/unit/BackgroundJob/GenerateBirthdayCalendarBackgroundJobTest.php @@ -38,7 +38,7 @@ class GenerateBirthdayCalendarBackgroundJobTest extends TestCase { /** @var \OCA\DAV\BackgroundJob\GenerateBirthdayCalendarBackgroundJob */ private $backgroundJob; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->birthdayService = $this->createMock(BirthdayService::class); diff --git a/apps/dav/tests/unit/BackgroundJob/RefreshWebcalJobTest.php b/apps/dav/tests/unit/BackgroundJob/RefreshWebcalJobTest.php index a26378038d..5af694fda8 100644 --- a/apps/dav/tests/unit/BackgroundJob/RefreshWebcalJobTest.php +++ b/apps/dav/tests/unit/BackgroundJob/RefreshWebcalJobTest.php @@ -56,7 +56,7 @@ class RefreshWebcalJobTest extends TestCase { /** @var IJobList | \PHPUnit_Framework_MockObject_MockObject */ private $jobList; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->caldavBackend = $this->createMock(CalDavBackend::class); diff --git a/apps/dav/tests/unit/BackgroundJob/RegisterRegenerateBirthdayCalendarsTest.php b/apps/dav/tests/unit/BackgroundJob/RegisterRegenerateBirthdayCalendarsTest.php index a08d3824d7..c71a80b369 100644 --- a/apps/dav/tests/unit/BackgroundJob/RegisterRegenerateBirthdayCalendarsTest.php +++ b/apps/dav/tests/unit/BackgroundJob/RegisterRegenerateBirthdayCalendarsTest.php @@ -49,7 +49,7 @@ class RegisterRegenerateBirthdayCalendarsTest extends TestCase { /** @var RegisterRegenerateBirthdayCalendars */ private $backgroundJob; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->time = $this->createMock(ITimeFactory::class); diff --git a/apps/dav/tests/unit/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJobTest.php b/apps/dav/tests/unit/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJobTest.php index e451570b73..37fccc3d4a 100644 --- a/apps/dav/tests/unit/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJobTest.php +++ b/apps/dav/tests/unit/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJobTest.php @@ -47,7 +47,7 @@ class UpdateCalendarResourcesRoomsBackgroundJobTest extends TestCase { /** @var CalDavBackend | \PHPUnit_Framework_MockObject_MockObject */ private $calDavBackend; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->resourceManager = $this->createMock(IResourceManager::class); @@ -59,7 +59,7 @@ class UpdateCalendarResourcesRoomsBackgroundJobTest extends TestCase { $this->calDavBackend); } - protected function tearDown() { + protected function tearDown(): void { $query = self::$realDatabase->getQueryBuilder(); $query->delete('calendar_resources')->execute(); $query->delete('calendar_resources_md')->execute(); diff --git a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php index 9f9a7c0133..3facbeb954 100644 --- a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php +++ b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php @@ -72,7 +72,7 @@ abstract class AbstractCalDavBackend extends TestCase { const UNIT_TEST_GROUP = 'principals/groups/caldav-unit-test-group'; const UNIT_TEST_GROUP2 = 'principals/groups/caldav-unit-test-group2'; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); @@ -106,7 +106,7 @@ abstract class AbstractCalDavBackend extends TestCase { $this->cleanUpBackend(); } - public function tearDown() { + public function tearDown(): void { $this->cleanUpBackend(); parent::tearDown(); } diff --git a/apps/dav/tests/unit/CalDAV/Activity/BackendTest.php b/apps/dav/tests/unit/CalDAV/Activity/BackendTest.php index 3b4e0038b5..0759745868 100644 --- a/apps/dav/tests/unit/CalDAV/Activity/BackendTest.php +++ b/apps/dav/tests/unit/CalDAV/Activity/BackendTest.php @@ -44,7 +44,7 @@ class BackendTest extends TestCase { /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ protected $userSession; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->activityManager = $this->createMock(IManager::class); $this->groupManager = $this->createMock(IGroupManager::class); diff --git a/apps/dav/tests/unit/CalDAV/Activity/Filter/CalendarTest.php b/apps/dav/tests/unit/CalDAV/Activity/Filter/CalendarTest.php index 1c31508255..b19f48762b 100644 --- a/apps/dav/tests/unit/CalDAV/Activity/Filter/CalendarTest.php +++ b/apps/dav/tests/unit/CalDAV/Activity/Filter/CalendarTest.php @@ -37,7 +37,7 @@ class CalendarTest extends TestCase { /** @var IFilter|\PHPUnit_Framework_MockObject_MockObject */ protected $filter; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->url = $this->createMock(IURLGenerator::class); $l = $this->createMock(IL10N::class); diff --git a/apps/dav/tests/unit/CalDAV/Activity/Filter/TodoTest.php b/apps/dav/tests/unit/CalDAV/Activity/Filter/TodoTest.php index f060e7a0b3..f8b505f6c5 100644 --- a/apps/dav/tests/unit/CalDAV/Activity/Filter/TodoTest.php +++ b/apps/dav/tests/unit/CalDAV/Activity/Filter/TodoTest.php @@ -37,7 +37,7 @@ class TodoTest extends TestCase { /** @var IFilter|\PHPUnit_Framework_MockObject_MockObject */ protected $filter; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->url = $this->createMock(IURLGenerator::class); $l = $this->createMock(IL10N::class); diff --git a/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php b/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php index db4d3e55fd..64f9b6f86a 100644 --- a/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php +++ b/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php @@ -43,7 +43,7 @@ class BaseTest extends TestCase { /** @var IProvider|Base|\PHPUnit_Framework_MockObject_MockObject */ protected $provider; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); $this->groupManager = $this->createMock(IGroupManager::class); diff --git a/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php b/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php index 44bf9237b2..d2935850e5 100644 --- a/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php +++ b/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php @@ -46,7 +46,7 @@ class EnablePluginTest extends TestCase { protected $response; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = $this->createMock(\Sabre\DAV\Server::class); diff --git a/apps/dav/tests/unit/CalDAV/CalendarHomeTest.php b/apps/dav/tests/unit/CalDAV/CalendarHomeTest.php index a7981cfa15..c93e436b1a 100644 --- a/apps/dav/tests/unit/CalDAV/CalendarHomeTest.php +++ b/apps/dav/tests/unit/CalDAV/CalendarHomeTest.php @@ -39,7 +39,7 @@ class CalendarHomeTest extends TestCase { /** @var CalendarHome */ private $calendarHome; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->backend = $this->createMock(CalDavBackend::class); diff --git a/apps/dav/tests/unit/CalDAV/CalendarImplTest.php b/apps/dav/tests/unit/CalDAV/CalendarImplTest.php index ca3256773b..432447ef5f 100644 --- a/apps/dav/tests/unit/CalDAV/CalendarImplTest.php +++ b/apps/dav/tests/unit/CalDAV/CalendarImplTest.php @@ -41,7 +41,7 @@ class CalendarImplTest extends \Test\TestCase { /** @var CalDavBackend | \PHPUnit_Framework_MockObject_MockObject */ private $backend; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->calendar = $this->createMock(Calendar::class); diff --git a/apps/dav/tests/unit/CalDAV/CalendarManagerTest.php b/apps/dav/tests/unit/CalDAV/CalendarManagerTest.php index 1831840610..89fe6972f9 100644 --- a/apps/dav/tests/unit/CalDAV/CalendarManagerTest.php +++ b/apps/dav/tests/unit/CalDAV/CalendarManagerTest.php @@ -45,7 +45,7 @@ class CalendarManagerTest extends \Test\TestCase { /** @var CalendarManager */ private $manager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->backend = $this->createMock(CalDavBackend::class); $this->l10n = $this->createMock(IL10N::class); diff --git a/apps/dav/tests/unit/CalDAV/CalendarTest.php b/apps/dav/tests/unit/CalDAV/CalendarTest.php index 7ce43f4091..8af6524b8a 100644 --- a/apps/dav/tests/unit/CalDAV/CalendarTest.php +++ b/apps/dav/tests/unit/CalDAV/CalendarTest.php @@ -43,7 +43,7 @@ class CalendarTest extends TestCase { /** @var IConfig */ protected $config; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->l10n = $this->getMockBuilder(IL10N::class) ->disableOriginalConstructor()->getMock(); diff --git a/apps/dav/tests/unit/CalDAV/OutboxTest.php b/apps/dav/tests/unit/CalDAV/OutboxTest.php index be5dc33fc6..3da6d8a9b9 100644 --- a/apps/dav/tests/unit/CalDAV/OutboxTest.php +++ b/apps/dav/tests/unit/CalDAV/OutboxTest.php @@ -34,7 +34,7 @@ class OutboxTest extends TestCase { /** @var Outbox */ private $outbox; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/apps/dav/tests/unit/CalDAV/PluginTest.php b/apps/dav/tests/unit/CalDAV/PluginTest.php index 87bf69c280..65b135cf90 100644 --- a/apps/dav/tests/unit/CalDAV/PluginTest.php +++ b/apps/dav/tests/unit/CalDAV/PluginTest.php @@ -30,7 +30,7 @@ class PluginTest extends TestCase { /** @var Plugin */ private $plugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->plugin = new Plugin(); diff --git a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php index 51977313ed..0bbfe99730 100644 --- a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php +++ b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php @@ -72,7 +72,7 @@ class PublicCalendarRootTest extends TestCase { /** @var ILogger */ private $logger; - public function setUp() { + public function setUp(): void { parent::setUp(); $db = \OC::$server->getDatabaseConnection(); @@ -108,7 +108,7 @@ class PublicCalendarRootTest extends TestCase { $this->l10n, $this->config); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); if (is_null($this->backend)) { diff --git a/apps/dav/tests/unit/CalDAV/Publishing/PublishingTest.php b/apps/dav/tests/unit/CalDAV/Publishing/PublishingTest.php index ed803c67dd..728905e6e6 100644 --- a/apps/dav/tests/unit/CalDAV/Publishing/PublishingTest.php +++ b/apps/dav/tests/unit/CalDAV/Publishing/PublishingTest.php @@ -48,7 +48,7 @@ class PluginTest extends TestCase { /** @var IURLGenerator | \PHPUnit_Framework_MockObject_MockObject */ private $urlGenerator; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class)-> diff --git a/apps/dav/tests/unit/CalDAV/Reminder/BackendTest.php b/apps/dav/tests/unit/CalDAV/Reminder/BackendTest.php index dae3cb74e2..9ba3b15b23 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/BackendTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/BackendTest.php @@ -42,7 +42,7 @@ class BackendTest extends TestCase { /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ private $timeFactory; - public function setUp() { + public function setUp(): void { parent::setUp(); $query = self::$realDatabase->getQueryBuilder(); @@ -56,7 +56,7 @@ class BackendTest extends TestCase { $this->createRemindersTestSet(); } - protected function tearDown() { + protected function tearDown(): void { $query = self::$realDatabase->getQueryBuilder(); $query->delete('calendar_reminders')->execute(); $query->delete('calendarobjects')->execute(); diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/AbstractNotificationProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/AbstractNotificationProviderTest.php index 889ac86731..305cf4866d 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/AbstractNotificationProviderTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/AbstractNotificationProviderTest.php @@ -68,7 +68,7 @@ abstract class AbstractNotificationProviderTest extends TestCase { */ protected $user; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->logger = $this->createMock(ILogger::class); diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php index a288907b4b..2654ac8b45 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php @@ -61,7 +61,7 @@ class EmailProviderTest extends AbstractNotificationProviderTest { /** @var IMailer|\PHPUnit\Framework\MockObject\MockObject */ private $mailer; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->mailer = $this->createMock(IMailer::class); diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php index 346faf1a65..c2a95278b3 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php @@ -61,7 +61,7 @@ class PushProviderTest extends AbstractNotificationProviderTest { /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ private $timeFactory; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php index d55f15ee5a..9eecc37fb1 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php @@ -41,7 +41,7 @@ class NotificationProviderManagerTest extends TestCase { /** * @throws \OCP\AppFramework\QueryException */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->providerManager = new NotificationProviderManager(); diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php index 8d38617ad2..6bb6a8be1c 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php @@ -50,7 +50,7 @@ class NotifierTest extends TestCase { /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ protected $timeFactory; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->urlGenerator = $this->createMock(IURLGenerator::class); diff --git a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php index 73f5ddde15..503478acc0 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php @@ -184,7 +184,7 @@ END:VEVENT END:VCALENDAR EOD; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->backend = $this->createMock(Backend::class); diff --git a/apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTest.php b/apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTest.php index ea2a752022..5f59af260c 100644 --- a/apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTest.php @@ -64,7 +64,7 @@ abstract class AbstractPrincipalBackendTest extends TestCase { /** @var string */ protected $expectedCUType; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userSession = $this->createMock(IUserSession::class); @@ -73,7 +73,7 @@ abstract class AbstractPrincipalBackendTest extends TestCase { $this->proxyMapper = $this->createMock(ProxyMapper::class); } - protected function tearDown() { + protected function tearDown(): void { $query = self::$realDatabase->getQueryBuilder(); $query->delete('calendar_resources')->execute(); diff --git a/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php b/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php index ef71cd3b8d..5d9e3e8455 100644 --- a/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php @@ -25,7 +25,7 @@ namespace OCA\DAV\Tests\unit\CalDAV\ResourceBooking; use OCA\DAV\CalDAV\ResourceBooking\ResourcePrincipalBackend; Class ResourcePrincipalBackendTest extends AbstractPrincipalBackendTest { - public function setUp() { + public function setUp(): void { parent::setUp(); $this->principalBackend = new ResourcePrincipalBackend(self::$realDatabase, diff --git a/apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php b/apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php index 92788f0d7a..34fa8e38f1 100644 --- a/apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php @@ -25,7 +25,7 @@ namespace OCA\DAV\Tests\unit\CalDAV\ResourceBooking; use OCA\DAV\CalDAV\ResourceBooking\RoomPrincipalBackend; Class RoomPrincipalBackendTest extends AbstractPrincipalBackendTest { - public function setUp() { + public function setUp(): void { parent::setUp(); $this->principalBackend = new RoomPrincipalBackend(self::$realDatabase, diff --git a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php index 967f3a5148..58342db12f 100644 --- a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php +++ b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php @@ -48,7 +48,7 @@ use Test\TestCase; class IMipPluginTest extends TestCase { - public function setUp() { + public function setUp(): void { $this->mailMessage = $this->createMock(IMessage::class); $this->mailMessage->method('setFrom')->willReturn($this->mailMessage); $this->mailMessage->method('setReplyTo')->willReturn($this->mailMessage); diff --git a/apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php b/apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php index ff6c0837c7..a489839fc8 100644 --- a/apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php +++ b/apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php @@ -36,7 +36,7 @@ class PluginTest extends TestCase { /** @var Server|\PHPUnit_Framework_MockObject_MockObject */ private $server; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = $this->createMock(Server::class); diff --git a/apps/dav/tests/unit/CalDAV/Search/SearchPluginTest.php b/apps/dav/tests/unit/CalDAV/Search/SearchPluginTest.php index 12eb74259f..414e4bc971 100644 --- a/apps/dav/tests/unit/CalDAV/Search/SearchPluginTest.php +++ b/apps/dav/tests/unit/CalDAV/Search/SearchPluginTest.php @@ -35,7 +35,7 @@ class SearchPluginTest extends TestCase { /** @var \OCA\DAV\CalDAV\Search\SearchPlugin $plugin */ protected $plugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = $this->createMock(\Sabre\DAV\Server::class); diff --git a/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php b/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php index 833221bd3e..02468e9686 100644 --- a/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php +++ b/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php @@ -55,7 +55,7 @@ class AddressBookImplTest extends TestCase { /** @var VCard | \PHPUnit_Framework_MockObject_MockObject */ private $vCard; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->addressBookInfo = [ diff --git a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php index 06ea1329ec..6bfda95a70 100644 --- a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php +++ b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php @@ -52,7 +52,7 @@ class BirthdayServiceTest extends TestCase { /** @var IL10N | \PHPUnit_Framework_MockObject_MockObject */ private $l10n; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->calDav = $this->createMock(CalDavBackend::class); diff --git a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php index aa18ef63a5..adc6df952a 100644 --- a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php +++ b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php @@ -121,7 +121,7 @@ class CardDavBackendTest extends TestCase { 'N:TestNoUID;;;;'.PHP_EOL. 'END:VCARD'; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); @@ -159,7 +159,7 @@ class CardDavBackendTest extends TestCase { $this->tearDown(); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); if (is_null($this->backend)) { diff --git a/apps/dav/tests/unit/CardDAV/ConverterTest.php b/apps/dav/tests/unit/CardDAV/ConverterTest.php index dbb035a33d..8484d3447f 100644 --- a/apps/dav/tests/unit/CardDAV/ConverterTest.php +++ b/apps/dav/tests/unit/CardDAV/ConverterTest.php @@ -39,7 +39,7 @@ class ConverterTest extends TestCase { /** @var AccountManager | PHPUnit_Framework_MockObject_MockObject */ private $accountManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->accountManager = $this->createMock(AccountManager::class); diff --git a/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php b/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php index f7b9137b48..3fee2bcc82 100644 --- a/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php +++ b/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php @@ -53,7 +53,7 @@ class ImageExportPluginTest extends TestCase { /** @var PhotoCache|\PHPUnit_Framework_MockObject_MockObject */ private $cache; - function setUp() { + function setUp(): void { parent::setUp(); $this->request = $this->createMock(RequestInterface::class); diff --git a/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php b/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php index c8dce8598a..105612b5cb 100644 --- a/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php +++ b/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php @@ -44,7 +44,7 @@ class PluginTest extends TestCase { /** @var IShareable | \PHPUnit_Framework_MockObject_MockObject */ private $book; - public function setUp() { + public function setUp(): void { parent::setUp(); /** @var Auth | \PHPUnit_Framework_MockObject_MockObject $authBackend */ diff --git a/apps/dav/tests/unit/Command/ListCalendarsTest.php b/apps/dav/tests/unit/Command/ListCalendarsTest.php index f2d315504b..9cd0280513 100644 --- a/apps/dav/tests/unit/Command/ListCalendarsTest.php +++ b/apps/dav/tests/unit/Command/ListCalendarsTest.php @@ -46,7 +46,7 @@ class ListCalendarsTest extends TestCase { const USERNAME = 'username'; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); diff --git a/apps/dav/tests/unit/Command/MoveCalendarTest.php b/apps/dav/tests/unit/Command/MoveCalendarTest.php index 94bcce03f3..50c1a57e0a 100644 --- a/apps/dav/tests/unit/Command/MoveCalendarTest.php +++ b/apps/dav/tests/unit/Command/MoveCalendarTest.php @@ -59,7 +59,7 @@ class MoveCalendarTest extends TestCase { /** @var MoveCalendar */ private $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); diff --git a/apps/dav/tests/unit/Command/RemoveInvalidSharesTest.php b/apps/dav/tests/unit/Command/RemoveInvalidSharesTest.php index be55ac186b..1e415ceafc 100644 --- a/apps/dav/tests/unit/Command/RemoveInvalidSharesTest.php +++ b/apps/dav/tests/unit/Command/RemoveInvalidSharesTest.php @@ -37,7 +37,7 @@ use Test\TestCase; */ class RemoveInvalidSharesTest extends TestCase { - public function setUp() { + public function setUp(): void { parent::setUp(); $db = \OC::$server->getDatabaseConnection(); diff --git a/apps/dav/tests/unit/Comments/CommentsNodeTest.php b/apps/dav/tests/unit/Comments/CommentsNodeTest.php index f38546f329..3c230ccfd4 100644 --- a/apps/dav/tests/unit/Comments/CommentsNodeTest.php +++ b/apps/dav/tests/unit/Comments/CommentsNodeTest.php @@ -47,7 +47,7 @@ class CommentsNodeTest extends \Test\TestCase { protected $logger; protected $userSession; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->commentsManager = $this->getMockBuilder(ICommentsManager::class) diff --git a/apps/dav/tests/unit/Comments/CommentsPluginTest.php b/apps/dav/tests/unit/Comments/CommentsPluginTest.php index c713a2d0cd..537989d940 100644 --- a/apps/dav/tests/unit/Comments/CommentsPluginTest.php +++ b/apps/dav/tests/unit/Comments/CommentsPluginTest.php @@ -54,7 +54,7 @@ class CommentsPluginTest extends \Test\TestCase { /** @var CommentsPluginImplementation */ private $plugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->tree = $this->getMockBuilder(Tree::class) ->disableOriginalConstructor() diff --git a/apps/dav/tests/unit/Comments/EntityCollectionTest.php b/apps/dav/tests/unit/Comments/EntityCollectionTest.php index 2657e117b1..2097c7ef03 100644 --- a/apps/dav/tests/unit/Comments/EntityCollectionTest.php +++ b/apps/dav/tests/unit/Comments/EntityCollectionTest.php @@ -45,7 +45,7 @@ class EntityCollectionTest extends \Test\TestCase { /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ protected $userSession; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->commentsManager = $this->getMockBuilder(ICommentsManager::class) diff --git a/apps/dav/tests/unit/Comments/EntityTypeCollectionTest.php b/apps/dav/tests/unit/Comments/EntityTypeCollectionTest.php index 9add05ee63..9286b46d2b 100644 --- a/apps/dav/tests/unit/Comments/EntityTypeCollectionTest.php +++ b/apps/dav/tests/unit/Comments/EntityTypeCollectionTest.php @@ -46,7 +46,7 @@ class EntityTypeCollectionTest extends \Test\TestCase { protected $childMap = []; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->commentsManager = $this->getMockBuilder(ICommentsManager::class) diff --git a/apps/dav/tests/unit/Comments/RootCollectionTest.php b/apps/dav/tests/unit/Comments/RootCollectionTest.php index 2391d885ba..a0e72bcd42 100644 --- a/apps/dav/tests/unit/Comments/RootCollectionTest.php +++ b/apps/dav/tests/unit/Comments/RootCollectionTest.php @@ -53,7 +53,7 @@ class RootCollectionTest extends \Test\TestCase { /** @var \OCP\IUser|\PHPUnit_Framework_MockObject_MockObject */ protected $user; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->getMockBuilder(IUser::class) diff --git a/apps/dav/tests/unit/Connector/PublicAuthTest.php b/apps/dav/tests/unit/Connector/PublicAuthTest.php index d23d9743e6..150a0fc000 100644 --- a/apps/dav/tests/unit/Connector/PublicAuthTest.php +++ b/apps/dav/tests/unit/Connector/PublicAuthTest.php @@ -54,7 +54,7 @@ class PublicAuthTest extends \Test\TestCase { /** @var string */ private $oldUser; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->session = $this->getMockBuilder(ISession::class) @@ -77,7 +77,7 @@ class PublicAuthTest extends \Test\TestCase { $this->oldUser = \OC_User::getUser(); } - protected function tearDown() { + protected function tearDown(): void { \OC_User::setIncognitoMode(false); // Set old user diff --git a/apps/dav/tests/unit/Connector/Sabre/AuthTest.php b/apps/dav/tests/unit/Connector/Sabre/AuthTest.php index a449b8f943..447a10afc7 100644 --- a/apps/dav/tests/unit/Connector/Sabre/AuthTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/AuthTest.php @@ -60,7 +60,7 @@ class AuthTest extends TestCase { /** @var Throttler */ private $throttler; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->session = $this->getMockBuilder(ISession::class) ->disableOriginalConstructor()->getMock(); diff --git a/apps/dav/tests/unit/Connector/Sabre/BearerAuthTest.php b/apps/dav/tests/unit/Connector/Sabre/BearerAuthTest.php index 9b3163d110..2af8fc4c74 100644 --- a/apps/dav/tests/unit/Connector/Sabre/BearerAuthTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/BearerAuthTest.php @@ -45,7 +45,7 @@ class BearerAuthTest extends TestCase { /** @var BearerAuth */ private $bearerAuth; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userSession = $this->createMock(\OC\User\Session::class); diff --git a/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php index 88baf981ac..03c1ef1ff9 100644 --- a/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php @@ -42,7 +42,7 @@ class BlockLegacyClientPluginTest extends TestCase { /** @var BlockLegacyClientPlugin */ private $blockLegacyClientVersionPlugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class) diff --git a/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php index 90bcb5f511..b605aba2bc 100644 --- a/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php @@ -40,7 +40,7 @@ class CommentsPropertiesPluginTest extends \Test\TestCase { protected $userSession; protected $server; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->commentsManager = $this->getMockBuilder(ICommentsManager::class) diff --git a/apps/dav/tests/unit/Connector/Sabre/CopyEtagHeaderPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/CopyEtagHeaderPluginTest.php index cc47a3a480..5685580c03 100644 --- a/apps/dav/tests/unit/Connector/Sabre/CopyEtagHeaderPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/CopyEtagHeaderPluginTest.php @@ -45,7 +45,7 @@ class CopyEtagHeaderPluginTest extends TestCase { /** @var Server */ private $server; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = new \Sabre\DAV\Server(); $this->plugin = new CopyEtagHeaderPlugin(); diff --git a/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php b/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php index 1f58351622..69f67f607b 100644 --- a/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php @@ -67,7 +67,7 @@ class CustomPropertiesBackendTest extends \Test\TestCase { */ private $user; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = new \Sabre\DAV\Server(); $this->tree = $this->getMockBuilder(Tree::class) @@ -90,7 +90,7 @@ class CustomPropertiesBackendTest extends \Test\TestCase { ); } - public function tearDown() { + public function tearDown(): void { $connection = \OC::$server->getDatabaseConnection(); $deleteStatement = $connection->prepare( 'DELETE FROM `*PREFIX*properties`' . diff --git a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php index a6dc1592db..ee64eb5bce 100644 --- a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php @@ -75,7 +75,7 @@ class DirectoryTest extends \Test\TestCase { /** @var \OC\Files\FileInfo | \PHPUnit_Framework_MockObject_MockObject */ private $info; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->view = $this->createMock('OC\Files\View'); diff --git a/apps/dav/tests/unit/Connector/Sabre/DummyGetResponsePluginTest.php b/apps/dav/tests/unit/Connector/Sabre/DummyGetResponsePluginTest.php index aec7032878..1d22579bdd 100644 --- a/apps/dav/tests/unit/Connector/Sabre/DummyGetResponsePluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/DummyGetResponsePluginTest.php @@ -41,7 +41,7 @@ class DummyGetResponsePluginTest extends TestCase { /** @var DummyGetResponsePlugin */ private $dummyGetResponsePlugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->dummyGetResponsePlugin = new DummyGetResponsePlugin(); diff --git a/apps/dav/tests/unit/Connector/Sabre/FakeLockerPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FakeLockerPluginTest.php index 0510e36a36..c2c808a8d9 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FakeLockerPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FakeLockerPluginTest.php @@ -44,7 +44,7 @@ class FakeLockerPluginTest extends TestCase { /** @var FakeLockerPlugin */ private $fakeLockerPlugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->fakeLockerPlugin = new FakeLockerPlugin(); } diff --git a/apps/dav/tests/unit/Connector/Sabre/FileTest.php b/apps/dav/tests/unit/Connector/Sabre/FileTest.php index 0157757a73..c41f3f6524 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FileTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FileTest.php @@ -62,7 +62,7 @@ class FileTest extends TestCase { /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */ protected $config; - public function setUp() { + public function setUp(): void { parent::setUp(); unset($_SERVER['HTTP_OC_CHUNKED']); unset($_SERVER['CONTENT_LENGTH']); @@ -78,7 +78,7 @@ class FileTest extends TestCase { $this->config = $this->getMockBuilder('\OCP\IConfig')->getMock(); } - public function tearDown() { + public function tearDown(): void { $userManager = \OC::$server->getUserManager(); $userManager->get($this->user)->delete(); unset($_SERVER['HTTP_OC_CHUNKED']); diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php index 65130b64a8..7322b71a7e 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php @@ -96,7 +96,7 @@ class FilesPluginTest extends TestCase { */ private $previewManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = $this->getMockBuilder(Server::class) ->disableOriginalConstructor() diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php index 37a72da0bf..ea58c50480 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php @@ -85,7 +85,7 @@ class FilesReportPluginTest extends \Test\TestCase { /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject * */ private $appManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->tree = $this->getMockBuilder(Tree::class) ->disableOriginalConstructor() diff --git a/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php b/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php index 71448c1ba1..a604757520 100644 --- a/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php @@ -39,7 +39,7 @@ class MaintenancePluginTest extends TestCase { /** @var MaintenancePlugin */ private $maintenancePlugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); diff --git a/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php index 54ec1f5aee..5320bd2830 100644 --- a/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php @@ -65,7 +65,7 @@ class PrincipalTest extends TestCase { /** @var ProxyMapper | \PHPUnit_Framework_MockObject_MockObject */ private $proxyMapper; - public function setUp() { + public function setUp(): void { $this->userManager = $this->createMock(IUserManager::class); $this->groupManager = $this->createMock(IGroupManager::class); $this->shareManager = $this->createMock(IManager::class); diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/PartFileInRootUploadTest.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/PartFileInRootUploadTest.php index 88b6316b68..d9fd17dcb7 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/PartFileInRootUploadTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/PartFileInRootUploadTest.php @@ -35,7 +35,7 @@ use OCP\IConfig; * @package OCA\DAV\Tests\unit\Connector\Sabre\RequestTest */ class PartFileInRootUploadTest extends UploadTest { - protected function setUp() { + protected function setUp(): void { $config = \OC::$server->getConfig(); $mockConfig = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() @@ -53,8 +53,8 @@ class PartFileInRootUploadTest extends UploadTest { parent::setUp(); } - protected function tearDown() { + protected function tearDown(): void { $this->restoreService('AllConfig'); - return parent::tearDown(); + parent::tearDown(); } } diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTestCase.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTestCase.php index fe31ccba13..b7d88b2208 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTestCase.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTestCase.php @@ -52,7 +52,7 @@ abstract class RequestTestCase extends TestCase { return $stream; } - protected function setUp() { + protected function setUp(): void { parent::setUp(); unset($_SERVER['HTTP_OC_CHUNKED']); diff --git a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php index 6494dab2b1..85d285f2c3 100644 --- a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php @@ -66,7 +66,7 @@ class SharesPluginTest extends \Test\TestCase { */ private $plugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = new \Sabre\DAV\Server(); $this->tree = $this->createMock(Tree::class); diff --git a/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php index 0f6f4f6ef2..384441f449 100644 --- a/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php @@ -70,7 +70,7 @@ class TagsPluginTest extends \Test\TestCase { */ private $plugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = new \Sabre\DAV\Server(); $this->tree = $this->getMockBuilder(Tree::class) diff --git a/apps/dav/tests/unit/Controller/BirthdayCalendarControllerTest.php b/apps/dav/tests/unit/Controller/BirthdayCalendarControllerTest.php index a105daa260..509ccb7e35 100644 --- a/apps/dav/tests/unit/Controller/BirthdayCalendarControllerTest.php +++ b/apps/dav/tests/unit/Controller/BirthdayCalendarControllerTest.php @@ -57,7 +57,7 @@ class BirthdayCalendarControllerTest extends TestCase { /** @var BirthdayCalendarController|\PHPUnit_Framework_MockObject_MockObject */ private $controller; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/apps/dav/tests/unit/Controller/DirectControllerTest.php b/apps/dav/tests/unit/Controller/DirectControllerTest.php index e52c67ac30..18034891dc 100644 --- a/apps/dav/tests/unit/Controller/DirectControllerTest.php +++ b/apps/dav/tests/unit/Controller/DirectControllerTest.php @@ -59,7 +59,7 @@ class DirectControllerTest extends TestCase { /** @var DirectController */ private $controller; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->rootFolder = $this->createMock(IRootFolder::class); diff --git a/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php b/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php index 7efb64e3dd..44ca70b934 100644 --- a/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php +++ b/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php @@ -52,7 +52,7 @@ class InvitationResponseControllerTest extends TestCase { /** @var InvitationResponseServer|\PHPUnit_Framework_MockObject_MockObject */ private $responseServer; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->dbConnection = $this->createMock(IDBConnection::class); diff --git a/apps/dav/tests/unit/DAV/CustomPropertiesBackendTest.php b/apps/dav/tests/unit/DAV/CustomPropertiesBackendTest.php index a7731f8b02..d43e42b93b 100644 --- a/apps/dav/tests/unit/DAV/CustomPropertiesBackendTest.php +++ b/apps/dav/tests/unit/DAV/CustomPropertiesBackendTest.php @@ -45,7 +45,7 @@ class CustomPropertiesBackendTest extends TestCase { /** @var CustomPropertiesBackend | \PHPUnit_Framework_MockObject_MockObject */ private $backend; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->tree = $this->createMock(Tree::class); diff --git a/apps/dav/tests/unit/DAV/GroupPrincipalTest.php b/apps/dav/tests/unit/DAV/GroupPrincipalTest.php index e5be0d75d5..356299dab5 100644 --- a/apps/dav/tests/unit/DAV/GroupPrincipalTest.php +++ b/apps/dav/tests/unit/DAV/GroupPrincipalTest.php @@ -49,7 +49,7 @@ class GroupPrincipalTest extends \Test\TestCase { /** @var GroupPrincipalBackend */ private $connector; - public function setUp() { + public function setUp(): void { $this->groupManager = $this->createMock(IGroupManager::class); $this->userSession = $this->createMock(IUserSession::class); $this->shareManager = $this->createMock(IManager::class); diff --git a/apps/dav/tests/unit/DAV/HookManagerTest.php b/apps/dav/tests/unit/DAV/HookManagerTest.php index 75baf8257d..6b64abc844 100644 --- a/apps/dav/tests/unit/DAV/HookManagerTest.php +++ b/apps/dav/tests/unit/DAV/HookManagerTest.php @@ -46,7 +46,7 @@ class HookManagerTest extends TestCase { /** @var EventDispatcherInterface | \PHPUnit_Framework_MockObject_MockObject */ private $eventDispatcher; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->eventDispatcher = $this->createMock(EventDispatcherInterface::class); $this->l10n = $this->createMock(IL10N::class); diff --git a/apps/dav/tests/unit/DAV/Sharing/PluginTest.php b/apps/dav/tests/unit/DAV/Sharing/PluginTest.php index 96cabfab1c..38eb86baf2 100644 --- a/apps/dav/tests/unit/DAV/Sharing/PluginTest.php +++ b/apps/dav/tests/unit/DAV/Sharing/PluginTest.php @@ -44,7 +44,7 @@ class PluginTest extends TestCase { /** @var IShareable | \PHPUnit_Framework_MockObject_MockObject */ private $book; - public function setUp() { + public function setUp(): void { parent::setUp(); /** @var Auth | \PHPUnit_Framework_MockObject_MockObject $authBackend */ diff --git a/apps/dav/tests/unit/Direct/DirectFileTest.php b/apps/dav/tests/unit/Direct/DirectFileTest.php index 2203e7c768..c48b34bb17 100644 --- a/apps/dav/tests/unit/Direct/DirectFileTest.php +++ b/apps/dav/tests/unit/Direct/DirectFileTest.php @@ -49,7 +49,7 @@ class DirectFileTest extends TestCase { /** @var DirectFile */ private $directFile; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->direct = Direct::fromParams([ diff --git a/apps/dav/tests/unit/Direct/DirectHomeTest.php b/apps/dav/tests/unit/Direct/DirectHomeTest.php index dbbfb1fe1f..8a976ff5db 100644 --- a/apps/dav/tests/unit/Direct/DirectHomeTest.php +++ b/apps/dav/tests/unit/Direct/DirectHomeTest.php @@ -58,7 +58,7 @@ class DirectHomeTest extends TestCase { /** @var DirectHome */ private $directHome; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->directMapper = $this->createMock(DirectMapper::class); diff --git a/apps/dav/tests/unit/Files/FileSearchBackendTest.php b/apps/dav/tests/unit/Files/FileSearchBackendTest.php index 20a7566c2f..b524af5f39 100644 --- a/apps/dav/tests/unit/Files/FileSearchBackendTest.php +++ b/apps/dav/tests/unit/Files/FileSearchBackendTest.php @@ -72,7 +72,7 @@ class FileSearchBackendTest extends TestCase { /** @var Directory|\PHPUnit_Framework_MockObject_MockObject */ private $davFolder; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->user = $this->createMock(IUser::class); diff --git a/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php b/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php index 90e8b00783..f311b0f2cb 100644 --- a/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php +++ b/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php @@ -48,7 +48,7 @@ class FilesDropPluginTest extends TestCase { /** @var ResponseInterface|\PHPUnit_Framework_MockObject_MockObject */ private $response; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->view = $this->createMock(View::class); diff --git a/apps/dav/tests/unit/Migration/CalDAVRemoveEmptyValueTest.php b/apps/dav/tests/unit/Migration/CalDAVRemoveEmptyValueTest.php index 8f2aa7f8b5..063bf48550 100644 --- a/apps/dav/tests/unit/Migration/CalDAVRemoveEmptyValueTest.php +++ b/apps/dav/tests/unit/Migration/CalDAVRemoveEmptyValueTest.php @@ -89,7 +89,7 @@ CREATED:20151214T091032Z END:VEVENT END:VCALENDAR'; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->logger = $this->createMock(ILogger::class); diff --git a/apps/dav/tests/unit/Migration/RefreshWebcalJobRegistrarTest.php b/apps/dav/tests/unit/Migration/RefreshWebcalJobRegistrarTest.php index 1bd7ab4e23..460286ea76 100644 --- a/apps/dav/tests/unit/Migration/RefreshWebcalJobRegistrarTest.php +++ b/apps/dav/tests/unit/Migration/RefreshWebcalJobRegistrarTest.php @@ -41,7 +41,7 @@ class RefreshWebcalJobRegistrarTest extends TestCase { /** @var RefreshWebcalJobRegistrar */ private $migration; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->db = $this->createMock(IDBConnection::class); diff --git a/apps/dav/tests/unit/Migration/RegenerateBirthdayCalendarsTest.php b/apps/dav/tests/unit/Migration/RegenerateBirthdayCalendarsTest.php index 657d4dcebb..a634737d1d 100644 --- a/apps/dav/tests/unit/Migration/RegenerateBirthdayCalendarsTest.php +++ b/apps/dav/tests/unit/Migration/RegenerateBirthdayCalendarsTest.php @@ -40,7 +40,7 @@ class RegenerateBirthdayCalendarsTest extends TestCase { /** @var RegenerateBirthdayCalendars */ private $migration; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->jobList = $this->createMock(IJobList::class); diff --git a/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningNodeTest.php b/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningNodeTest.php index 693b3f61f9..2f65fc7c45 100644 --- a/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningNodeTest.php +++ b/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningNodeTest.php @@ -34,7 +34,7 @@ class AppleProvisioningNodeTest extends TestCase { /** @var AppleProvisioningNode */ private $node; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->timeFactory = $this->createMock(ITimeFactory::class); diff --git a/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php b/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php index 1b854a541c..eeadf34971 100644 --- a/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php +++ b/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php @@ -59,7 +59,7 @@ class AppleProvisioningPluginTest extends TestCase { /** @var AppleProvisioningPlugin */ protected $plugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = $this->createMock(\Sabre\DAV\Server::class); diff --git a/apps/dav/tests/unit/Settings/CalDAVSettingsTest.php b/apps/dav/tests/unit/Settings/CalDAVSettingsTest.php index a9df63a03a..17bcf9fba9 100644 --- a/apps/dav/tests/unit/Settings/CalDAVSettingsTest.php +++ b/apps/dav/tests/unit/Settings/CalDAVSettingsTest.php @@ -35,7 +35,7 @@ class CalDAVSettingsTest extends TestCase { /** @var CalDAVSettings */ private $settings; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php b/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php index 77f69c0734..926c652b77 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php @@ -49,7 +49,7 @@ class SystemTagMappingNodeTest extends \Test\TestCase { */ private $user; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tagManager = $this->getMockBuilder(ISystemTagManager::class) diff --git a/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php b/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php index bfaff5c214..d2bd59bff6 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php @@ -46,7 +46,7 @@ class SystemTagNodeTest extends \Test\TestCase { */ private $user; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tagManager = $this->getMockBuilder(ISystemTagManager::class) diff --git a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php index 21afc4fc17..1282807842 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php @@ -85,7 +85,7 @@ class SystemTagPluginTest extends \Test\TestCase { */ private $plugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->tree = $this->getMockBuilder(Tree::class) ->disableOriginalConstructor() diff --git a/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php b/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php index 840b36e3f1..da46843a5b 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php @@ -45,7 +45,7 @@ class SystemTagsByIdCollectionTest extends \Test\TestCase { */ private $user; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tagManager = $this->getMockBuilder(ISystemTagManager::class) diff --git a/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php b/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php index 4795d54e84..ff56ae3d44 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php @@ -49,7 +49,7 @@ class SystemTagsObjectMappingCollectionTest extends \Test\TestCase { */ private $user; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tagManager = $this->getMockBuilder(ISystemTagManager::class) diff --git a/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php b/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php index 877fe56c6d..5e4e539b1e 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php @@ -54,7 +54,7 @@ class SystemTagsObjectTypeCollectionTest extends \Test\TestCase { */ private $userFolder; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tagManager = $this->getMockBuilder(ISystemTagManager::class) diff --git a/apps/dav/tests/unit/Upload/ChunkingPluginTest.php b/apps/dav/tests/unit/Upload/ChunkingPluginTest.php index 410ab2fc02..bc2b434bcf 100644 --- a/apps/dav/tests/unit/Upload/ChunkingPluginTest.php +++ b/apps/dav/tests/unit/Upload/ChunkingPluginTest.php @@ -51,7 +51,7 @@ class ChunkingPluginTest extends TestCase { /** @var ResponseInterface | \PHPUnit_Framework_MockObject_MockObject */ private $response; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = $this->getMockBuilder('\Sabre\DAV\Server') diff --git a/apps/encryption/tests/Command/TestEnableMasterKey.php b/apps/encryption/tests/Command/TestEnableMasterKey.php index ea59107647..ef6bd9eec2 100644 --- a/apps/encryption/tests/Command/TestEnableMasterKey.php +++ b/apps/encryption/tests/Command/TestEnableMasterKey.php @@ -53,7 +53,7 @@ class TestEnableMasterKey extends TestCase { /** @var \Symfony\Component\Console\Input\InputInterface | \PHPUnit_Framework_MockObject_MockObject */ protected $input; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->util = $this->getMockBuilder(Util::class) diff --git a/apps/encryption/tests/Controller/RecoveryControllerTest.php b/apps/encryption/tests/Controller/RecoveryControllerTest.php index 79f03f214e..5737f8e86c 100644 --- a/apps/encryption/tests/Controller/RecoveryControllerTest.php +++ b/apps/encryption/tests/Controller/RecoveryControllerTest.php @@ -152,7 +152,7 @@ class RecoveryControllerTest extends TestCase { } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->requestMock = $this->getMockBuilder(IRequest::class) diff --git a/apps/encryption/tests/Controller/SettingsControllerTest.php b/apps/encryption/tests/Controller/SettingsControllerTest.php index b50f7cd0b6..bc2a7ed853 100644 --- a/apps/encryption/tests/Controller/SettingsControllerTest.php +++ b/apps/encryption/tests/Controller/SettingsControllerTest.php @@ -74,7 +74,7 @@ class SettingsControllerTest extends TestCase { /** @var \OCA\Encryption\Util|\PHPUnit_Framework_MockObject_MockObject */ private $utilMock; - protected function setUp() { + protected function setUp(): void { parent::setUp(); diff --git a/apps/encryption/tests/Controller/StatusControllerTest.php b/apps/encryption/tests/Controller/StatusControllerTest.php index ffd12bd20b..ccf33ffd37 100644 --- a/apps/encryption/tests/Controller/StatusControllerTest.php +++ b/apps/encryption/tests/Controller/StatusControllerTest.php @@ -51,7 +51,7 @@ class StatusControllerTest extends TestCase { /** @var StatusController */ protected $controller; - protected function setUp() { + protected function setUp(): void { parent::setUp(); diff --git a/apps/encryption/tests/Crypto/CryptTest.php b/apps/encryption/tests/Crypto/CryptTest.php index 7ecb017b85..1731f25d53 100644 --- a/apps/encryption/tests/Crypto/CryptTest.php +++ b/apps/encryption/tests/Crypto/CryptTest.php @@ -53,7 +53,7 @@ class CryptTest extends TestCase { /** @var Crypt */ private $crypt; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->logger = $this->getMockBuilder(ILogger::class) diff --git a/apps/encryption/tests/Crypto/DecryptAllTest.php b/apps/encryption/tests/Crypto/DecryptAllTest.php index 64e29241a0..b314bb5b54 100644 --- a/apps/encryption/tests/Crypto/DecryptAllTest.php +++ b/apps/encryption/tests/Crypto/DecryptAllTest.php @@ -53,7 +53,7 @@ class DecryptAllTest extends TestCase { /** @var QuestionHelper | \PHPUnit_Framework_MockObject_MockObject */ protected $questionHelper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->util = $this->getMockBuilder(Util::class) diff --git a/apps/encryption/tests/Crypto/EncryptAllTest.php b/apps/encryption/tests/Crypto/EncryptAllTest.php index 80ff97f17e..f5f042aac6 100644 --- a/apps/encryption/tests/Crypto/EncryptAllTest.php +++ b/apps/encryption/tests/Crypto/EncryptAllTest.php @@ -90,7 +90,7 @@ class EncryptAllTest extends TestCase { /** @var EncryptAll */ protected $encryptAll; - function setUp() { + function setUp(): void { parent::setUp(); $this->setupUser = $this->getMockBuilder(Setup::class) ->disableOriginalConstructor()->getMock(); diff --git a/apps/encryption/tests/Crypto/EncryptionTest.php b/apps/encryption/tests/Crypto/EncryptionTest.php index 1f628ff19c..4136673a6e 100644 --- a/apps/encryption/tests/Crypto/EncryptionTest.php +++ b/apps/encryption/tests/Crypto/EncryptionTest.php @@ -73,7 +73,7 @@ class EncryptionTest extends TestCase { /** @var \OCP\Files\Storage|\PHPUnit_Framework_MockObject_MockObject */ private $storageMock; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->storageMock = $this->getMockBuilder(Storage::class) diff --git a/apps/encryption/tests/HookManagerTest.php b/apps/encryption/tests/HookManagerTest.php index 5db3d10cc8..5ff76f918d 100644 --- a/apps/encryption/tests/HookManagerTest.php +++ b/apps/encryption/tests/HookManagerTest.php @@ -57,7 +57,7 @@ class HookManagerTest extends TestCase { /** * */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); // have to make instance static to preserve data between tests self::$instance = new HookManager(); diff --git a/apps/encryption/tests/Hooks/UserHooksTest.php b/apps/encryption/tests/Hooks/UserHooksTest.php index c59343a7c9..3853aaffae 100644 --- a/apps/encryption/tests/Hooks/UserHooksTest.php +++ b/apps/encryption/tests/Hooks/UserHooksTest.php @@ -333,7 +333,7 @@ class UserHooksTest extends TestCase { $this->assertNull($userHooks->setPassphrase($this->params)); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->loggerMock = $this->createMock(ILogger::class); $this->keyManagerMock = $this->getMockBuilder(KeyManager::class) diff --git a/apps/encryption/tests/KeyManagerTest.php b/apps/encryption/tests/KeyManagerTest.php index 7af9e39e95..6e5c51db3c 100644 --- a/apps/encryption/tests/KeyManagerTest.php +++ b/apps/encryption/tests/KeyManagerTest.php @@ -79,7 +79,7 @@ class KeyManagerTest extends TestCase { /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */ private $configMock; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userId = 'user1'; $this->systemKeyId = 'systemKeyId'; diff --git a/apps/encryption/tests/RecoveryTest.php b/apps/encryption/tests/RecoveryTest.php index 942c3469c9..c9216e7778 100644 --- a/apps/encryption/tests/RecoveryTest.php +++ b/apps/encryption/tests/RecoveryTest.php @@ -259,7 +259,7 @@ class RecoveryTest extends TestCase { ['/', 'testkey', 'admin'])); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->user = $this->createMock(IUser::class); diff --git a/apps/encryption/tests/SessionTest.php b/apps/encryption/tests/SessionTest.php index a11aca2f75..25c652b36a 100644 --- a/apps/encryption/tests/SessionTest.php +++ b/apps/encryption/tests/SessionTest.php @@ -201,7 +201,7 @@ class SessionTest extends TestCase { /** * */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->sessionMock = $this->createMock(ISession::class); @@ -221,7 +221,7 @@ class SessionTest extends TestCase { $this->instance = new Session($this->sessionMock); } - protected function tearDown() { + protected function tearDown(): void { self::$tempStorage = []; parent::tearDown(); } diff --git a/apps/encryption/tests/Settings/AdminTest.php b/apps/encryption/tests/Settings/AdminTest.php index 728ffe1d93..9df483916b 100644 --- a/apps/encryption/tests/Settings/AdminTest.php +++ b/apps/encryption/tests/Settings/AdminTest.php @@ -50,7 +50,7 @@ class AdminTest extends TestCase { /** @var ISession */ private $session; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->l = $this->getMockBuilder(IL10N::class)->getMock(); diff --git a/apps/encryption/tests/Users/SetupTest.php b/apps/encryption/tests/Users/SetupTest.php index 141120671f..4111498ac6 100644 --- a/apps/encryption/tests/Users/SetupTest.php +++ b/apps/encryption/tests/Users/SetupTest.php @@ -48,7 +48,7 @@ class SetupTest extends TestCase { */ private $instance; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $logMock = $this->createMock(ILogger::class); $userSessionMock = $this->getMockBuilder(IUserSession::class) diff --git a/apps/encryption/tests/UtilTest.php b/apps/encryption/tests/UtilTest.php index 477501be1a..77c070d715 100644 --- a/apps/encryption/tests/UtilTest.php +++ b/apps/encryption/tests/UtilTest.php @@ -80,7 +80,7 @@ class UtilTest extends TestCase { $this->assertTrue($this->instance->userHasFiles('admin')); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->mountMock = $this->createMock(IMountPoint::class); $this->filesMock = $this->createMock(View::class); diff --git a/apps/federatedfilesharing/tests/AddressHandlerTest.php b/apps/federatedfilesharing/tests/AddressHandlerTest.php index 63691f6162..efea34dbab 100644 --- a/apps/federatedfilesharing/tests/AddressHandlerTest.php +++ b/apps/federatedfilesharing/tests/AddressHandlerTest.php @@ -46,7 +46,7 @@ class AddressHandlerTest extends \Test\TestCase { /** @var CloudIdManager */ private $cloudIdManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->urlGenerator = $this->getMockBuilder(IURLGenerator::class) diff --git a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php index db4c391411..88f486f3c6 100644 --- a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php +++ b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php @@ -84,7 +84,7 @@ class MountPublicLinkControllerTest extends \Test\TestCase { /** @var ICloudIdManager */ private $cloudIdManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder(IRequest::class)->disableOriginalConstructor()->getMock(); diff --git a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php index 57d82f63e1..d8903d438f 100644 --- a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php +++ b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php @@ -112,7 +112,7 @@ class RequestHandlerControllerTest extends \Test\TestCase { /** @var ICloudFederationShare|\PHPUnit_Framework_MockObject_MockObject */ private $cloudFederationShare; - protected function setUp() { + protected function setUp(): void { $this->share = $this->getMockBuilder(IShare::class)->getMock(); $this->federatedShareProvider = $this->getMockBuilder('OCA\FederatedFileSharing\FederatedShareProvider') diff --git a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php index ae233e565d..31d13df8f3 100644 --- a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php +++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php @@ -85,7 +85,7 @@ class FederatedShareProviderTest extends \Test\TestCase { /** @var \PHPUnit_Framework_MockObject_MockObject|ICloudFederationProviderManager */ private $cloudFederationProviderManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -131,10 +131,10 @@ class FederatedShareProviderTest extends \Test\TestCase { $this->shareManager = \OC::$server->getShareManager(); } - public function tearDown() { + public function tearDown(): void { $this->connection->getQueryBuilder()->delete('share')->execute(); - return parent::tearDown(); + parent::tearDown(); } public function testCreate() { diff --git a/apps/federatedfilesharing/tests/NotificationsTest.php b/apps/federatedfilesharing/tests/NotificationsTest.php index d93b9d608c..769184f162 100644 --- a/apps/federatedfilesharing/tests/NotificationsTest.php +++ b/apps/federatedfilesharing/tests/NotificationsTest.php @@ -53,7 +53,7 @@ class NotificationsTest extends \Test\TestCase { /** @var ICloudFederationFactory|\PHPUnit_Framework_MockObject_MockObject */ private $cloudFederationFactory; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->jobList = $this->getMockBuilder('OCP\BackgroundJob\IJobList')->getMock(); diff --git a/apps/federatedfilesharing/tests/Settings/AdminTest.php b/apps/federatedfilesharing/tests/Settings/AdminTest.php index f0cf3b77d3..bca8ad7342 100644 --- a/apps/federatedfilesharing/tests/Settings/AdminTest.php +++ b/apps/federatedfilesharing/tests/Settings/AdminTest.php @@ -38,7 +38,7 @@ class AdminTest extends TestCase { /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ private $gsConfig; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->federatedShareProvider = $this->createMock(FederatedShareProvider::class); $this->gsConfig = $this->createMock(IConfig::class); diff --git a/apps/federatedfilesharing/tests/TestCase.php b/apps/federatedfilesharing/tests/TestCase.php index 35fbd97803..50fcada6d3 100644 --- a/apps/federatedfilesharing/tests/TestCase.php +++ b/apps/federatedfilesharing/tests/TestCase.php @@ -39,7 +39,7 @@ abstract class TestCase extends \Test\TestCase { const TEST_FILES_SHARING_API_USER1 = "test-share-user1"; const TEST_FILES_SHARING_API_USER2 = "test-share-user2"; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); // reset backend @@ -53,14 +53,14 @@ abstract class TestCase extends \Test\TestCase { $backend->createUser(self::TEST_FILES_SHARING_API_USER2, self::TEST_FILES_SHARING_API_USER2); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); //login as user1 self::loginHelper(self::TEST_FILES_SHARING_API_USER1); } - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { // cleanup users $user = \OC::$server->getUserManager()->get(self::TEST_FILES_SHARING_API_USER1); if ($user !== null) { diff --git a/apps/federatedfilesharing/tests/TokenHandlerTest.php b/apps/federatedfilesharing/tests/TokenHandlerTest.php index 37798269a3..bd3c0f9291 100644 --- a/apps/federatedfilesharing/tests/TokenHandlerTest.php +++ b/apps/federatedfilesharing/tests/TokenHandlerTest.php @@ -39,7 +39,7 @@ class TokenHandlerTest extends \Test\TestCase { /** @var int */ private $expectedTokenLength = 15; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->secureRandom = $this->getMockBuilder(ISecureRandom::class)->getMock(); diff --git a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php index adc621650a..b4e8365b50 100644 --- a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php +++ b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php @@ -81,7 +81,7 @@ class GetSharedSecretTest extends TestCase { /** @var GetSharedSecret */ private $getSharedSecret; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->httpClientService = $this->createMock(IClientService::class); diff --git a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php index e8f63fb30d..d97919942a 100644 --- a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php +++ b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php @@ -73,7 +73,7 @@ class RequestSharedSecretTest extends TestCase { /** @var RequestSharedSecret */ private $requestSharedSecret; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->httpClientService = $this->createMock(IClientService::class); diff --git a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php index df9f284d2c..c625d960e5 100644 --- a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php +++ b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php @@ -67,7 +67,7 @@ class OCSAuthAPIControllerTest extends TestCase { /** @var int simulated timestamp */ private $currentTime = 1234567; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/apps/federation/tests/Controller/SettingsControllerTest.php b/apps/federation/tests/Controller/SettingsControllerTest.php index 41312b8ef2..9b283b5090 100644 --- a/apps/federation/tests/Controller/SettingsControllerTest.php +++ b/apps/federation/tests/Controller/SettingsControllerTest.php @@ -45,7 +45,7 @@ class SettingsControllerTest extends TestCase { /** @var \PHPUnit_Framework_MockObject_MockObject | \OCA\Federation\TrustedServers */ private $trustedServers; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder(IRequest::class)->getMock(); diff --git a/apps/federation/tests/DbHandlerTest.php b/apps/federation/tests/DbHandlerTest.php index bad0268553..348f5b7030 100644 --- a/apps/federation/tests/DbHandlerTest.php +++ b/apps/federation/tests/DbHandlerTest.php @@ -49,7 +49,7 @@ class DbHandlerTest extends TestCase { /** @var string */ private $dbTable = 'trusted_servers'; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -65,7 +65,7 @@ class DbHandlerTest extends TestCase { $this->assertEmpty($result, 'we need to start with a empty trusted_servers table'); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); $query = $this->connection->getQueryBuilder()->delete($this->dbTable); $query->execute(); diff --git a/apps/federation/tests/HooksTest.php b/apps/federation/tests/HooksTest.php index 34ac8dfd53..ad6e0bf8a7 100644 --- a/apps/federation/tests/HooksTest.php +++ b/apps/federation/tests/HooksTest.php @@ -36,7 +36,7 @@ class HooksTest extends TestCase { /** @var Hooks */ private $hooks; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->trustedServers = $this->getMockBuilder('OCA\Federation\TrustedServers') diff --git a/apps/federation/tests/Middleware/AddServerMiddlewareTest.php b/apps/federation/tests/Middleware/AddServerMiddlewareTest.php index eb06301942..4423233b93 100644 --- a/apps/federation/tests/Middleware/AddServerMiddlewareTest.php +++ b/apps/federation/tests/Middleware/AddServerMiddlewareTest.php @@ -48,7 +48,7 @@ class AddServerMiddlewareTest extends TestCase { /** @var \PHPUnit_Framework_MockObject_MockObject | SettingsController */ private $controller; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->logger = $this->getMockBuilder(ILogger::class)->getMock(); diff --git a/apps/federation/tests/Settings/AdminTest.php b/apps/federation/tests/Settings/AdminTest.php index 758bda6bc5..0fc1f7c25a 100644 --- a/apps/federation/tests/Settings/AdminTest.php +++ b/apps/federation/tests/Settings/AdminTest.php @@ -34,7 +34,7 @@ class AdminTest extends TestCase { /** @var TrustedServers */ private $trustedServers; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->trustedServers = $this->getMockBuilder('\OCA\Federation\TrustedServers')->disableOriginalConstructor()->getMock(); $this->admin = new Admin( diff --git a/apps/federation/tests/SyncFederationAddressbooksTest.php b/apps/federation/tests/SyncFederationAddressbooksTest.php index 2148b4b3c0..e1c810bde9 100644 --- a/apps/federation/tests/SyncFederationAddressbooksTest.php +++ b/apps/federation/tests/SyncFederationAddressbooksTest.php @@ -38,7 +38,7 @@ class SyncFederationAddressbooksTest extends \Test\TestCase { /** @var \PHPUnit_Framework_MockObject_MockObject | DiscoveryService */ private $discoveryService; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->discoveryService = $this->getMockBuilder(DiscoveryService::class) diff --git a/apps/federation/tests/TrustedServersTest.php b/apps/federation/tests/TrustedServersTest.php index 209f41322c..82e5654e63 100644 --- a/apps/federation/tests/TrustedServersTest.php +++ b/apps/federation/tests/TrustedServersTest.php @@ -76,7 +76,7 @@ class TrustedServersTest extends TestCase { /** @var \PHPUnit_Framework_MockObject_MockObject|ITimeFactory */ private $timeFactory; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->dbHandler = $this->getMockBuilder(DbHandler::class) diff --git a/apps/files/tests/Activity/ProviderTest.php b/apps/files/tests/Activity/ProviderTest.php index d3738ae41a..da1f014ad0 100644 --- a/apps/files/tests/Activity/ProviderTest.php +++ b/apps/files/tests/Activity/ProviderTest.php @@ -55,7 +55,7 @@ class ProviderTest extends TestCase { /** @var IEventMerger|\PHPUnit_Framework_MockObject_MockObject */ protected $eventMerger; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->l10nFactory = $this->createMock(IFactory::class); diff --git a/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php b/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php index bf4e78d6b2..4b0496a1aa 100644 --- a/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php +++ b/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php @@ -38,7 +38,7 @@ class DeleteOrphanedItemsJobTest extends \Test\TestCase { /** @var \OCP\IDBConnection */ protected $connection; - protected function setup() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); } diff --git a/apps/files/tests/BackgroundJob/ScanFilesTest.php b/apps/files/tests/BackgroundJob/ScanFilesTest.php index a75e54edfe..8539c6ba7d 100644 --- a/apps/files/tests/BackgroundJob/ScanFilesTest.php +++ b/apps/files/tests/BackgroundJob/ScanFilesTest.php @@ -42,7 +42,7 @@ class ScanFilesTest extends TestCase { /** @var ScanFiles */ private $scanFiles; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/apps/files/tests/Command/DeleteOrphanedFilesTest.php b/apps/files/tests/Command/DeleteOrphanedFilesTest.php index 684192858e..c3f7d8712a 100644 --- a/apps/files/tests/Command/DeleteOrphanedFilesTest.php +++ b/apps/files/tests/Command/DeleteOrphanedFilesTest.php @@ -55,7 +55,7 @@ class DeleteOrphanedFilesTest extends TestCase { */ private $user1; - protected function setup() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -68,7 +68,7 @@ class DeleteOrphanedFilesTest extends TestCase { $this->command = new DeleteOrphanedFiles($this->connection); } - protected function tearDown() { + protected function tearDown(): void { $userManager = \OC::$server->getUserManager(); $user1 = $userManager->get($this->user1); if($user1) { diff --git a/apps/files/tests/Controller/ApiControllerTest.php b/apps/files/tests/Controller/ApiControllerTest.php index 22daf7c23b..e5fbe7d386 100644 --- a/apps/files/tests/Controller/ApiControllerTest.php +++ b/apps/files/tests/Controller/ApiControllerTest.php @@ -68,7 +68,7 @@ class ApiControllerTest extends TestCase { /** @var Folder|\PHPUnit_Framework_MockObject_MockObject */ private $userFolder; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder(IRequest::class) diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php index 4de56082e9..c57be81b48 100644 --- a/apps/files/tests/Controller/ViewControllerTest.php +++ b/apps/files/tests/Controller/ViewControllerTest.php @@ -76,7 +76,7 @@ class ViewControllerTest extends TestCase { /** @var Helper|\PHPUnit_Framework_MockObject_MockObject */ private $activityHelper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder(IRequest::class)->getMock(); $this->urlGenerator = $this->getMockBuilder(IURLGenerator::class)->getMock(); diff --git a/apps/files/tests/Service/TagServiceTest.php b/apps/files/tests/Service/TagServiceTest.php index 709ba3b9c9..4590277aeb 100644 --- a/apps/files/tests/Service/TagServiceTest.php +++ b/apps/files/tests/Service/TagServiceTest.php @@ -70,7 +70,7 @@ class TagServiceTest extends \Test\TestCase { */ private $tagger; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->user = static::getUniqueID('user'); $this->activityManager = $this->createMock(IManager::class); @@ -112,7 +112,7 @@ class TagServiceTest extends \Test\TestCase { } - protected function tearDown() { + protected function tearDown(): void { \OC_User::setUserId(''); $user = \OC::$server->getUserManager()->get($this->user); if ($user !== null) { $user->delete(); } diff --git a/apps/files_external/tests/Auth/Password/GlobalAuth.php b/apps/files_external/tests/Auth/Password/GlobalAuth.php index c447be7a66..15f8f5f47a 100644 --- a/apps/files_external/tests/Auth/Password/GlobalAuth.php +++ b/apps/files_external/tests/Auth/Password/GlobalAuth.php @@ -45,7 +45,7 @@ class GlobalAuthTest extends TestCase { */ private $instance; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->l10n = $this->createMock(IL10N::class); $this->credentialsManager = $this->createMock(ICredentialsManager::class); diff --git a/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php b/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php index dcafdd84e3..006bb45837 100644 --- a/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php +++ b/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php @@ -50,7 +50,7 @@ class UserPlaceholderHandlerTest extends \Test\TestCase { /** @var UserPlaceholderHandler */ protected $handler; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->createMock(IUser::class); diff --git a/apps/files_external/tests/Controller/AjaxControllerTest.php b/apps/files_external/tests/Controller/AjaxControllerTest.php index f18ee8323b..a940f49fc2 100644 --- a/apps/files_external/tests/Controller/AjaxControllerTest.php +++ b/apps/files_external/tests/Controller/AjaxControllerTest.php @@ -48,7 +48,7 @@ class AjaxControllerTest extends TestCase { /** @var AjaxController */ private $ajaxController; - public function setUp() { + public function setUp(): void { $this->request = $this->createMock(IRequest::class); $this->rsa = $this->getMockBuilder('\\OCA\\Files_External\\Lib\\Auth\\PublicKey\\RSA') ->disableOriginalConstructor() diff --git a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php index c3a684f2e9..bcc8d3e2d9 100644 --- a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php +++ b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php @@ -34,7 +34,7 @@ use OCP\ILogger; use OCP\IRequest; class GlobalStoragesControllerTest extends StoragesControllerTest { - public function setUp() { + public function setUp(): void { parent::setUp(); $this->service = $this->getMockBuilder('\OCA\Files_External\Service\GlobalStoragesService') ->disableOriginalConstructor() diff --git a/apps/files_external/tests/Controller/StoragesControllerTest.php b/apps/files_external/tests/Controller/StoragesControllerTest.php index 0340057809..184b7a6c69 100644 --- a/apps/files_external/tests/Controller/StoragesControllerTest.php +++ b/apps/files_external/tests/Controller/StoragesControllerTest.php @@ -46,11 +46,11 @@ abstract class StoragesControllerTest extends \Test\TestCase { */ protected $service; - public function setUp() { + public function setUp(): void { \OC_Mount_Config::$skipTest = true; } - public function tearDown() { + public function tearDown(): void { \OC_Mount_Config::$skipTest = false; } diff --git a/apps/files_external/tests/Controller/UserStoragesControllerTest.php b/apps/files_external/tests/Controller/UserStoragesControllerTest.php index 067fd45972..ddd6d01717 100644 --- a/apps/files_external/tests/Controller/UserStoragesControllerTest.php +++ b/apps/files_external/tests/Controller/UserStoragesControllerTest.php @@ -42,7 +42,7 @@ class UserStoragesControllerTest extends StoragesControllerTest { */ private $oldAllowedBackends; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->service = $this->getMockBuilder('\OCA\Files_External\Service\UserStoragesService') ->disableOriginalConstructor() diff --git a/apps/files_external/tests/Service/BackendServiceTest.php b/apps/files_external/tests/Service/BackendServiceTest.php index 707ee89941..8cd1e680de 100644 --- a/apps/files_external/tests/Service/BackendServiceTest.php +++ b/apps/files_external/tests/Service/BackendServiceTest.php @@ -37,7 +37,7 @@ class BackendServiceTest extends \Test\TestCase { /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */ protected $config; - protected function setUp() { + protected function setUp(): void { $this->config = $this->createMock(IConfig::class); } diff --git a/apps/files_external/tests/Service/DBConfigServiceTest.php b/apps/files_external/tests/Service/DBConfigServiceTest.php index e6115ddec2..375f1e7018 100644 --- a/apps/files_external/tests/Service/DBConfigServiceTest.php +++ b/apps/files_external/tests/Service/DBConfigServiceTest.php @@ -44,13 +44,13 @@ class DBConfigServiceTest extends TestCase { private $mounts = []; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); $this->dbConfig = new DBConfigService($this->connection, \OC::$server->getCrypto()); } - public function tearDown() { + public function tearDown(): void { foreach ($this->mounts as $mount) { $this->dbConfig->removeMount($mount); } diff --git a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php index 2760374e59..c4d1055521 100644 --- a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php @@ -33,12 +33,12 @@ use OCA\Files_External\Service\GlobalStoragesService; * @group DB */ class GlobalStoragesServiceTest extends StoragesServiceTest { - public function setUp() { + public function setUp(): void { parent::setUp(); $this->service = new GlobalStoragesService($this->backendService, $this->dbConfig, $this->mountCache); } - public function tearDown() { + public function tearDown(): void { @unlink($this->dataDir . '/mount.json'); parent::tearDown(); } diff --git a/apps/files_external/tests/Service/StoragesServiceTest.php b/apps/files_external/tests/Service/StoragesServiceTest.php index ef0f1852d9..4e2b73f261 100644 --- a/apps/files_external/tests/Service/StoragesServiceTest.php +++ b/apps/files_external/tests/Service/StoragesServiceTest.php @@ -92,7 +92,7 @@ abstract class StoragesServiceTest extends \Test\TestCase { */ protected $mountCache; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->dbConfig = new CleaningDBConfig(\OC::$server->getDatabaseConnection(), \OC::$server->getCrypto()); self::$hookCalls = array(); @@ -175,7 +175,7 @@ abstract class StoragesServiceTest extends \Test\TestCase { ->willReturn($containerMock); } - public function tearDown() { + public function tearDown(): void { \OC_Mount_Config::$skipTest = false; self::$hookCalls = array(); if ($this->dbConfig) { diff --git a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php index 3a6d22f2ad..9a6100d807 100644 --- a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php @@ -60,7 +60,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { const GROUP_ID = 'test_group'; const GROUP_ID2 = 'test_group2'; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->globalStoragesService = $this->service; diff --git a/apps/files_external/tests/Service/UserStoragesServiceTest.php b/apps/files_external/tests/Service/UserStoragesServiceTest.php index ea6346151b..ce0b3ab65b 100644 --- a/apps/files_external/tests/Service/UserStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserStoragesServiceTest.php @@ -50,7 +50,7 @@ class UserStoragesServiceTest extends StoragesServiceTest { */ protected $globalStoragesService; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->globalStoragesService = new GlobalStoragesService($this->backendService, $this->dbConfig, $this->mountCache); diff --git a/apps/files_external/tests/Settings/AdminTest.php b/apps/files_external/tests/Settings/AdminTest.php index 6236f2d416..3889fe456e 100644 --- a/apps/files_external/tests/Settings/AdminTest.php +++ b/apps/files_external/tests/Settings/AdminTest.php @@ -43,7 +43,7 @@ class AdminTest extends TestCase { /** @var GlobalAuth|\PHPUnit_Framework_MockObject_MockObject */ private $globalAuth; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->encryptionManager = $this->createMock(IManager::class); $this->globalStoragesService = $this->createMock(GlobalStoragesService::class); diff --git a/apps/files_external/tests/Settings/SectionTest.php b/apps/files_external/tests/Settings/SectionTest.php index b83f8f0fee..3a8a4f5f78 100644 --- a/apps/files_external/tests/Settings/SectionTest.php +++ b/apps/files_external/tests/Settings/SectionTest.php @@ -37,7 +37,7 @@ class SectionTest extends TestCase { /** @var Section */ private $section; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->urlGenerator = $this->getMockBuilder(IURLGenerator::class)->disableOriginalConstructor()->getMock(); $this->l = $this->getMockBuilder(IL10N::class)->disableOriginalConstructor()->getMock(); diff --git a/apps/files_external/tests/Storage/Amazons3Test.php b/apps/files_external/tests/Storage/Amazons3Test.php index 83552ca21a..985c93423a 100644 --- a/apps/files_external/tests/Storage/Amazons3Test.php +++ b/apps/files_external/tests/Storage/Amazons3Test.php @@ -40,7 +40,7 @@ class Amazons3Test extends \Test\Files\Storage\Storage { private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = include('files_external/tests/config.amazons3.php'); @@ -50,7 +50,7 @@ class Amazons3Test extends \Test\Files\Storage\Storage { $this->instance = new AmazonS3($this->config); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->rmdir(''); } diff --git a/apps/files_external/tests/Storage/FtpTest.php b/apps/files_external/tests/Storage/FtpTest.php index 0e12a5f4af..b2dd83b75a 100644 --- a/apps/files_external/tests/Storage/FtpTest.php +++ b/apps/files_external/tests/Storage/FtpTest.php @@ -40,7 +40,7 @@ use OCA\Files_External\Lib\Storage\FTP; class FtpTest extends \Test\Files\Storage\Storage { private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $id = $this->getUniqueID(); @@ -53,7 +53,7 @@ class FtpTest extends \Test\Files\Storage\Storage { $this->instance->mkdir('/'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { \OCP\Files::rmdirr($this->instance->constructUrl('')); } diff --git a/apps/files_external/tests/Storage/OwncloudTest.php b/apps/files_external/tests/Storage/OwncloudTest.php index 3853d0e6ce..8a274af165 100644 --- a/apps/files_external/tests/Storage/OwncloudTest.php +++ b/apps/files_external/tests/Storage/OwncloudTest.php @@ -39,7 +39,7 @@ class OwncloudTest extends \Test\Files\Storage\Storage { private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $id = $this->getUniqueID(); @@ -52,7 +52,7 @@ class OwncloudTest extends \Test\Files\Storage\Storage { $this->instance->mkdir('/'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->rmdir('/'); } diff --git a/apps/files_external/tests/Storage/SFTP_KeyTest.php b/apps/files_external/tests/Storage/SFTP_KeyTest.php index c67d418f67..fe40c0fbd9 100644 --- a/apps/files_external/tests/Storage/SFTP_KeyTest.php +++ b/apps/files_external/tests/Storage/SFTP_KeyTest.php @@ -38,7 +38,7 @@ use OCA\Files_External\Lib\Storage\SFTP_Key; class SFTP_KeyTest extends \Test\Files\Storage\Storage { private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $id = $this->getUniqueID(); @@ -52,7 +52,7 @@ class SFTP_KeyTest extends \Test\Files\Storage\Storage { $this->instance->mkdir('/'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->rmdir('/'); } diff --git a/apps/files_external/tests/Storage/SftpTest.php b/apps/files_external/tests/Storage/SftpTest.php index 9ad7cfd56a..bee514485a 100644 --- a/apps/files_external/tests/Storage/SftpTest.php +++ b/apps/files_external/tests/Storage/SftpTest.php @@ -45,7 +45,7 @@ class SftpTest extends \Test\Files\Storage\Storage { private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $id = $this->getUniqueID(); @@ -58,7 +58,7 @@ class SftpTest extends \Test\Files\Storage\Storage { $this->instance->mkdir('/'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->rmdir('/'); } diff --git a/apps/files_external/tests/Storage/SmbTest.php b/apps/files_external/tests/Storage/SmbTest.php index fc59f0ed38..645cb0e290 100644 --- a/apps/files_external/tests/Storage/SmbTest.php +++ b/apps/files_external/tests/Storage/SmbTest.php @@ -46,7 +46,7 @@ class SmbTest extends \Test\Files\Storage\Storage { */ protected $instance; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $id = $this->getUniqueID(); @@ -62,7 +62,7 @@ class SmbTest extends \Test\Files\Storage\Storage { $this->instance->mkdir('/'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->rmdir(''); } diff --git a/apps/files_external/tests/Storage/SwiftTest.php b/apps/files_external/tests/Storage/SwiftTest.php index 6517be493d..2e1bc5e0ed 100644 --- a/apps/files_external/tests/Storage/SwiftTest.php +++ b/apps/files_external/tests/Storage/SwiftTest.php @@ -46,7 +46,7 @@ class SwiftTest extends \Test\Files\Storage\Storage { */ protected $instance; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = include('files_external/tests/config.swift.php'); @@ -56,7 +56,7 @@ class SwiftTest extends \Test\Files\Storage\Storage { $this->instance = new Swift($this->config); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { try { $container = $this->instance->getContainer(); diff --git a/apps/files_external/tests/Storage/WebdavTest.php b/apps/files_external/tests/Storage/WebdavTest.php index c0d69592c2..1aae245d67 100644 --- a/apps/files_external/tests/Storage/WebdavTest.php +++ b/apps/files_external/tests/Storage/WebdavTest.php @@ -39,7 +39,7 @@ use OC\Files\Type\Detection; */ class WebdavTest extends \Test\Files\Storage\Storage { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $id = $this->getUniqueID(); @@ -55,7 +55,7 @@ class WebdavTest extends \Test\Files\Storage\Storage { $this->instance->mkdir('/'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->rmdir('/'); } diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php index 5cf3906e56..05acb9c18e 100644 --- a/apps/files_sharing/tests/ApiTest.php +++ b/apps/files_sharing/tests/ApiTest.php @@ -63,7 +63,7 @@ class ApiTest extends TestCase { /** @var string */ private $subsubfolder; - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC::$server->getConfig()->setAppValue('core', 'shareapi_exclude_groups', 'no'); @@ -88,7 +88,7 @@ class ApiTest extends TestCase { $this->userFolder = \OC::$server->getUserFolder(self::TEST_FILES_SHARING_API_USER1); } - protected function tearDown() { + protected function tearDown(): void { if($this->view instanceof \OC\Files\View) { $this->view->unlink($this->filename); $this->view->deleteAll($this->folder); diff --git a/apps/files_sharing/tests/CacheTest.php b/apps/files_sharing/tests/CacheTest.php index e8d8ae7f63..d2f96d01eb 100644 --- a/apps/files_sharing/tests/CacheTest.php +++ b/apps/files_sharing/tests/CacheTest.php @@ -62,7 +62,7 @@ class CacheTest extends TestCase { /** @var \OCP\Share\IManager */ protected $shareManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->shareManager = \OC::$server->getShareManager(); @@ -128,7 +128,7 @@ class CacheTest extends TestCase { $this->sharedCache = $this->sharedStorage->getCache(); } - protected function tearDown() { + protected function tearDown(): void { if($this->sharedCache) { $this->sharedCache->clear(); } diff --git a/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php b/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php index 8f51678876..93bef4afbf 100644 --- a/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php +++ b/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php @@ -43,7 +43,7 @@ class ShareRecipientSorterTest extends TestCase { /** @var ShareRecipientSorter */ protected $sorter; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->shareManager = $this->createMock(IManager::class); diff --git a/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php b/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php index 257d9c35df..4e100cf209 100644 --- a/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php +++ b/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php @@ -57,7 +57,7 @@ class CleanupRemoteStoragesTest extends TestCase { ['notExistingId' => 'shared::c34568c143cdac7d2f06e0800b5280f9', 'share_token' => 'f2c69dad1dc0649f26976fd210fc62e7', 'remote' => 'https://hostname.tld/owncloud7', 'user' => 'user7'], ]; - protected function setup() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -110,7 +110,7 @@ class CleanupRemoteStoragesTest extends TestCase { $this->command = new CleanupRemoteStorages($this->connection); } - public function tearDown() { + public function tearDown(): void { $storageQuery = \OC::$server->getDatabaseConnection()->getQueryBuilder(); $storageQuery->delete('storages') ->where($storageQuery->expr()->eq('id', $storageQuery->createParameter('id'))); @@ -133,7 +133,7 @@ class CleanupRemoteStoragesTest extends TestCase { } } - return parent::tearDown(); + parent::tearDown(); } private function doesStorageExist($numericId) { diff --git a/apps/files_sharing/tests/Controller/ExternalShareControllerTest.php b/apps/files_sharing/tests/Controller/ExternalShareControllerTest.php index 71a4f4adeb..d2237acbd7 100644 --- a/apps/files_sharing/tests/Controller/ExternalShareControllerTest.php +++ b/apps/files_sharing/tests/Controller/ExternalShareControllerTest.php @@ -43,7 +43,7 @@ class ExternalShareControllerTest extends \Test\TestCase { /** @var IClientService */ private $clientService; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder('\\OCP\\IRequest') ->disableOriginalConstructor()->getMock(); diff --git a/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php b/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php index ed556172a2..cbe3872bb6 100644 --- a/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php +++ b/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php @@ -54,7 +54,7 @@ class PublicPreviewControllerTest extends TestCase { /** @var PublicPreviewController */ private $controller; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->previewManager = $this->createMock(IPreview::class); diff --git a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php index 6452ad5001..32a2e88f78 100644 --- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php @@ -100,7 +100,7 @@ class ShareAPIControllerTest extends TestCase { /** @var IServerContainer|\PHPUnit_Framework_MockObject_MockObject */ private $serverContainer; - protected function setUp() { + protected function setUp(): void { $this->shareManager = $this->createMock(IManager::class); $this->shareManager ->expects($this->any()) diff --git a/apps/files_sharing/tests/Controller/ShareControllerTest.php b/apps/files_sharing/tests/Controller/ShareControllerTest.php index 01b20e5857..ec6fc9a598 100644 --- a/apps/files_sharing/tests/Controller/ShareControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareControllerTest.php @@ -93,7 +93,7 @@ class ShareControllerTest extends \Test\TestCase { /** @var IL10N */ private $l10n; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->appName = 'files_sharing'; @@ -142,7 +142,7 @@ class ShareControllerTest extends \Test\TestCase { $this->loginAsUser($this->user); } - protected function tearDown() { + protected function tearDown(): void { \OC_Util::tearDownFS(); \OC_User::setUserId(''); Filesystem::tearDown(); diff --git a/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php b/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php index 627990a2f9..b8d87d5cd6 100644 --- a/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php @@ -45,7 +45,7 @@ class ShareInfoControllerTest extends TestCase { private $shareManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->shareManager = $this->createMock(ShareManager::class); diff --git a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php index c5d31e3b59..20790fc0bf 100644 --- a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php @@ -62,7 +62,7 @@ class ShareesAPIControllerTest extends TestCase { /** @var ISearch|\PHPUnit_Framework_MockObject_MockObject */ protected $collaboratorSearch; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->uid = 'test123'; diff --git a/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php b/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php index 03f19525e0..028878e3ab 100644 --- a/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php +++ b/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php @@ -61,7 +61,7 @@ class DeleteOrphanedSharesJobTest extends \Test\TestCase { */ private $user2; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { $appManager = \OC::$server->getAppManager(); self::$trashBinStatus = $appManager->isEnabledForUser('files_trashbin'); $appManager->disableApp('files_trashbin'); @@ -70,13 +70,13 @@ class DeleteOrphanedSharesJobTest extends \Test\TestCase { \OC\Files\Filesystem::getLoader()->removeStorageWrapper('oc_trashbin'); } - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { if (self::$trashBinStatus) { \OC::$server->getAppManager()->enableApp('files_trashbin'); } } - protected function setup() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -95,7 +95,7 @@ class DeleteOrphanedSharesJobTest extends \Test\TestCase { $this->job = new DeleteOrphanedSharesJob(); } - protected function tearDown() { + protected function tearDown(): void { $this->connection->executeUpdate('DELETE FROM `*PREFIX*share`'); $userManager = \OC::$server->getUserManager(); diff --git a/apps/files_sharing/tests/ExpireSharesJobTest.php b/apps/files_sharing/tests/ExpireSharesJobTest.php index e255f08ccf..0f34f0785a 100644 --- a/apps/files_sharing/tests/ExpireSharesJobTest.php +++ b/apps/files_sharing/tests/ExpireSharesJobTest.php @@ -55,7 +55,7 @@ class ExpireSharesJobTest extends \Test\TestCase { */ private $user2; - protected function setup() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -74,7 +74,7 @@ class ExpireSharesJobTest extends \Test\TestCase { $this->job = new ExpireSharesJob(); } - protected function tearDown() { + protected function tearDown(): void { $this->connection->executeUpdate('DELETE FROM `*PREFIX*share`'); $userManager = \OC::$server->getUserManager(); diff --git a/apps/files_sharing/tests/External/CacheTest.php b/apps/files_sharing/tests/External/CacheTest.php index 02109e35db..39ff1ff24f 100644 --- a/apps/files_sharing/tests/External/CacheTest.php +++ b/apps/files_sharing/tests/External/CacheTest.php @@ -56,7 +56,7 @@ class CacheTest extends TestCase { /** @var ICloudIdManager */ private $cloudIdManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->cloudIdManager = new CloudIdManager(); @@ -83,7 +83,7 @@ class CacheTest extends TestCase { ); } - protected function tearDown() { + protected function tearDown(): void { if ($this->cache) { $this->cache->clear(); } diff --git a/apps/files_sharing/tests/External/ManagerTest.php b/apps/files_sharing/tests/External/ManagerTest.php index 93c17ca10c..2224b76708 100644 --- a/apps/files_sharing/tests/External/ManagerTest.php +++ b/apps/files_sharing/tests/External/ManagerTest.php @@ -78,7 +78,7 @@ class ManagerTest extends TestCase { private $user; private $testMountProvider; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->uid = $this->getUniqueID('user'); diff --git a/apps/files_sharing/tests/External/ScannerTest.php b/apps/files_sharing/tests/External/ScannerTest.php index fe77182e83..b9bfb1a84a 100644 --- a/apps/files_sharing/tests/External/ScannerTest.php +++ b/apps/files_sharing/tests/External/ScannerTest.php @@ -33,7 +33,7 @@ class ScannerTest extends TestCase { /** @var \OC\Files\Cache\Cache|\PHPUnit_Framework_MockObject_MockObject */ protected $cache; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->storage = $this->getMockBuilder('\OCA\Files_Sharing\External\Storage') diff --git a/apps/files_sharing/tests/LockingTest.php b/apps/files_sharing/tests/LockingTest.php index 414e879081..47394fc588 100644 --- a/apps/files_sharing/tests/LockingTest.php +++ b/apps/files_sharing/tests/LockingTest.php @@ -46,7 +46,7 @@ class LockingTest extends TestCase { private $ownerUid; private $recipientUid; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userBackend = new \Test\Util\User\Dummy(); @@ -74,7 +74,7 @@ class LockingTest extends TestCase { $this->assertTrue(Filesystem::file_exists('bar.txt')); } - public function tearDown() { + public function tearDown(): void { \OC::$server->getUserManager()->removeBackend($this->userBackend); parent::tearDown(); } diff --git a/apps/files_sharing/tests/Middleware/OCSShareAPIMiddlewareTest.php b/apps/files_sharing/tests/Middleware/OCSShareAPIMiddlewareTest.php index a1d1f1bf55..06d33859a2 100644 --- a/apps/files_sharing/tests/Middleware/OCSShareAPIMiddlewareTest.php +++ b/apps/files_sharing/tests/Middleware/OCSShareAPIMiddlewareTest.php @@ -44,7 +44,7 @@ class OCSShareAPIMiddlewareTest extends \Test\TestCase { /** @var OCSShareAPIMiddleware */ private $middleware; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->shareManager = $this->createMock(IManager::class); diff --git a/apps/files_sharing/tests/Middleware/ShareInfoMiddlewareTest.php b/apps/files_sharing/tests/Middleware/ShareInfoMiddlewareTest.php index 781861aa39..e6744d5fd1 100644 --- a/apps/files_sharing/tests/Middleware/ShareInfoMiddlewareTest.php +++ b/apps/files_sharing/tests/Middleware/ShareInfoMiddlewareTest.php @@ -41,7 +41,7 @@ class ShareInfoMiddlewareTest extends TestCase { /** @var ShareInfoMiddleware */ private $middleware; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->shareManager = $this->createMock(ShareManager::class); diff --git a/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php b/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php index f49b472a35..e3fb602acd 100644 --- a/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php +++ b/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php @@ -59,7 +59,7 @@ class SharingCheckMiddlewareTest extends \Test\TestCase { /** @var IRequest | \PHPUnit_Framework_MockObject_MockObject */ private $request; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php b/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php index c4c78b04a2..418ede9179 100644 --- a/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php +++ b/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php @@ -47,7 +47,7 @@ class SetPasswordColumnTest extends TestCase { private $table = 'share'; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -57,7 +57,7 @@ class SetPasswordColumnTest extends TestCase { $this->cleanDB(); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); $this->cleanDB(); } diff --git a/apps/files_sharing/tests/MountProviderTest.php b/apps/files_sharing/tests/MountProviderTest.php index f4acfdfafe..5b20524da4 100644 --- a/apps/files_sharing/tests/MountProviderTest.php +++ b/apps/files_sharing/tests/MountProviderTest.php @@ -59,7 +59,7 @@ class MountProviderTest extends \Test\TestCase { /** @var ILogger | \PHPUnit_Framework_MockObject_MockObject */ private $logger; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); diff --git a/apps/files_sharing/tests/PermissionsTest.php b/apps/files_sharing/tests/PermissionsTest.php index a64d0b25e1..e47cfff68d 100644 --- a/apps/files_sharing/tests/PermissionsTest.php +++ b/apps/files_sharing/tests/PermissionsTest.php @@ -60,7 +60,7 @@ class PermissionsTest extends TestCase { /** @var Cache */ private $ownerCache; - protected function setUp() { + protected function setUp(): void { parent::setUp(); self::loginHelper(self::TEST_FILES_SHARING_API_USER1); @@ -115,7 +115,7 @@ class PermissionsTest extends TestCase { $this->sharedCacheRestrictedShare = $this->sharedStorageRestrictedShare->getCache(); } - protected function tearDown() { + protected function tearDown(): void { if ($this->sharedCache) { $this->sharedCache->clear(); } diff --git a/apps/files_sharing/tests/PropagationTestCase.php b/apps/files_sharing/tests/PropagationTestCase.php index 21cea3033a..5f16173725 100644 --- a/apps/files_sharing/tests/PropagationTestCase.php +++ b/apps/files_sharing/tests/PropagationTestCase.php @@ -31,17 +31,17 @@ abstract class PropagationTestCase extends TestCase { protected $fileIds = []; // [$user=>[$path=>$id]] protected $fileEtags = []; // [$id=>$etag] - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); \OCA\Files_Sharing\Helper::registerHooks(); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->setUpShares(); } - protected function tearDown() { + protected function tearDown(): void { \OC_Hook::clear('OC_Filesystem', 'post_write'); \OC_Hook::clear('OC_Filesystem', 'post_delete'); \OC_Hook::clear('OC_Filesystem', 'post_rename'); diff --git a/apps/files_sharing/tests/ShareTest.php b/apps/files_sharing/tests/ShareTest.php index 61bec2caea..f0614d5c98 100644 --- a/apps/files_sharing/tests/ShareTest.php +++ b/apps/files_sharing/tests/ShareTest.php @@ -38,7 +38,7 @@ class ShareTest extends TestCase { private static $tempStorage; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->folder = self::TEST_FOLDER_NAME; @@ -56,7 +56,7 @@ class ShareTest extends TestCase { $this->view->file_put_contents($this->folder . $this->subfolder . $this->filename, $this->data); } - protected function tearDown() { + protected function tearDown(): void { self::loginHelper(self::TEST_FILES_SHARING_API_USER1); $this->view->unlink($this->filename); $this->view->deleteAll($this->folder); diff --git a/apps/files_sharing/tests/SharedMountTest.php b/apps/files_sharing/tests/SharedMountTest.php index f01e9896ef..17b2abf3fc 100644 --- a/apps/files_sharing/tests/SharedMountTest.php +++ b/apps/files_sharing/tests/SharedMountTest.php @@ -44,7 +44,7 @@ class SharedMountTest extends TestCase { /** @var IUserManager */ private $userManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->folder = '/folder_share_storage_test'; @@ -62,7 +62,7 @@ class SharedMountTest extends TestCase { $this->userManager = \OC::$server->getUserManager(); } - protected function tearDown() { + protected function tearDown(): void { if ($this->view) { if ($this->view->file_exists($this->folder)) { $this->view->unlink($this->folder); diff --git a/apps/files_sharing/tests/SharedStorageTest.php b/apps/files_sharing/tests/SharedStorageTest.php index e2cb65d9ac..c4cefee4a3 100644 --- a/apps/files_sharing/tests/SharedStorageTest.php +++ b/apps/files_sharing/tests/SharedStorageTest.php @@ -40,7 +40,7 @@ use OCP\Share\IShare; */ class SharedStorageTest extends TestCase { - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OCA\Files_Trashbin\Trashbin::registerHooks(); $this->folder = '/folder_share_storage_test'; @@ -55,7 +55,7 @@ class SharedStorageTest extends TestCase { $this->view->file_put_contents($this->folder . $this->filename, "file in subfolder"); } - protected function tearDown() { + protected function tearDown(): void { if ($this->view) { if ($this->view->file_exists($this->folder)) { $this->view->unlink($this->folder); diff --git a/apps/files_sharing/tests/TestCase.php b/apps/files_sharing/tests/TestCase.php index 6c5f078f9e..ce5ceb1f64 100644 --- a/apps/files_sharing/tests/TestCase.php +++ b/apps/files_sharing/tests/TestCase.php @@ -68,7 +68,7 @@ abstract class TestCase extends \Test\TestCase { /** @var \OCP\Files\IRootFolder */ protected $rootFolder; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); $application = new Application(); @@ -107,7 +107,7 @@ abstract class TestCase extends \Test\TestCase { \OC::$server->getGroupManager()->addBackend($groupBackend); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); //login as user1 @@ -120,7 +120,7 @@ abstract class TestCase extends \Test\TestCase { $this->rootFolder = \OC::$server->getRootFolder(); } - protected function tearDown() { + protected function tearDown(): void { $qb = \OC::$server->getDatabaseConnection()->getQueryBuilder(); $qb->delete('share'); $qb->execute(); @@ -128,7 +128,7 @@ abstract class TestCase extends \Test\TestCase { parent::tearDown(); } - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { // cleanup users $user = \OC::$server->getUserManager()->get(self::TEST_FILES_SHARING_API_USER1); if ($user !== null) { $user->delete(); } diff --git a/apps/files_sharing/tests/UnshareChildrenTest.php b/apps/files_sharing/tests/UnshareChildrenTest.php index ce7767d192..92ff48eb3b 100644 --- a/apps/files_sharing/tests/UnshareChildrenTest.php +++ b/apps/files_sharing/tests/UnshareChildrenTest.php @@ -42,7 +42,7 @@ class UnshareChildrenTest extends TestCase { private static $tempStorage; - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OCP\Util::connectHook('OC_Filesystem', 'post_delete', '\OCA\Files_Sharing\Hooks', 'unshareChildren'); @@ -61,7 +61,7 @@ class UnshareChildrenTest extends TestCase { $this->view->file_put_contents($this->folder . $this->subfolder . $this->filename, $this->data); } - protected function tearDown() { + protected function tearDown(): void { if ($this->view) { $this->view->deleteAll($this->folder); } diff --git a/apps/files_sharing/tests/UpdaterTest.php b/apps/files_sharing/tests/UpdaterTest.php index 2e044716d0..d20f794883 100644 --- a/apps/files_sharing/tests/UpdaterTest.php +++ b/apps/files_sharing/tests/UpdaterTest.php @@ -38,12 +38,12 @@ class UpdaterTest extends TestCase { const TEST_FOLDER_NAME = '/folder_share_updater_test'; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); \OCA\Files_Sharing\Helper::registerHooks(); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->folder = self::TEST_FOLDER_NAME; @@ -56,7 +56,7 @@ class UpdaterTest extends TestCase { $this->view->file_put_contents($this->folder . '/' . $this->filename, $this->data); } - protected function tearDown() { + protected function tearDown(): void { if ($this->view) { $this->view->unlink($this->filename); $this->view->deleteAll($this->folder); diff --git a/apps/files_sharing/tests/WatcherTest.php b/apps/files_sharing/tests/WatcherTest.php index 59f84057a1..e332327a91 100644 --- a/apps/files_sharing/tests/WatcherTest.php +++ b/apps/files_sharing/tests/WatcherTest.php @@ -53,7 +53,7 @@ class WatcherTest extends TestCase { /** @var \OCP\Share\IShare */ private $_share; - protected function setUp() { + protected function setUp(): void { parent::setUp(); self::loginHelper(self::TEST_FILES_SHARING_API_USER1); @@ -88,7 +88,7 @@ class WatcherTest extends TestCase { $this->sharedCache = $this->sharedStorage->getCache(); } - protected function tearDown() { + protected function tearDown(): void { if ($this->sharedCache) { $this->sharedCache->clear(); } diff --git a/apps/files_trashbin/tests/CapabilitiesTest.php b/apps/files_trashbin/tests/CapabilitiesTest.php index c4729d7a7c..9a891e8652 100644 --- a/apps/files_trashbin/tests/CapabilitiesTest.php +++ b/apps/files_trashbin/tests/CapabilitiesTest.php @@ -27,7 +27,7 @@ class CapabilitiesTest extends TestCase { /** @var Capabilities */ private $capabilities; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->capabilities = new Capabilities(); } diff --git a/apps/files_trashbin/tests/Command/CleanUpTest.php b/apps/files_trashbin/tests/Command/CleanUpTest.php index 9a517df1a5..74231ada18 100644 --- a/apps/files_trashbin/tests/Command/CleanUpTest.php +++ b/apps/files_trashbin/tests/Command/CleanUpTest.php @@ -61,7 +61,7 @@ class CleanUpTest extends TestCase { /** @var string */ protected $user0 = 'user0'; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->rootFolder = $this->getMockBuilder('OCP\Files\IRootFolder') ->disableOriginalConstructor()->getMock(); diff --git a/apps/files_trashbin/tests/Controller/PreviewControllerTest.php b/apps/files_trashbin/tests/Controller/PreviewControllerTest.php index fd562b5cd0..a6891a6c07 100644 --- a/apps/files_trashbin/tests/Controller/PreviewControllerTest.php +++ b/apps/files_trashbin/tests/Controller/PreviewControllerTest.php @@ -65,7 +65,7 @@ class PreviewControllerTest extends TestCase { /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ private $userSession; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->rootFolder = $this->createMock(IRootFolder::class); diff --git a/apps/files_trashbin/tests/StorageTest.php b/apps/files_trashbin/tests/StorageTest.php index c98f5fd2b1..9969093374 100644 --- a/apps/files_trashbin/tests/StorageTest.php +++ b/apps/files_trashbin/tests/StorageTest.php @@ -66,7 +66,7 @@ class StorageTest extends \Test\TestCase { */ private $userView; - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC_Hook::clear(); @@ -88,7 +88,7 @@ class StorageTest extends \Test\TestCase { $this->userView->file_put_contents('folder/inside.txt', 'bar'); } - protected function tearDown() { + protected function tearDown(): void { \OC\Files\Filesystem::getLoader()->removeStorageWrapper('oc_trashbin'); $this->logout(); $user = \OC::$server->getUserManager()->get($this->user); diff --git a/apps/files_trashbin/tests/TrashbinTest.php b/apps/files_trashbin/tests/TrashbinTest.php index 3b1fff31fe..9e5b029d9d 100644 --- a/apps/files_trashbin/tests/TrashbinTest.php +++ b/apps/files_trashbin/tests/TrashbinTest.php @@ -54,7 +54,7 @@ class TrashbinTest extends \Test\TestCase { */ private $rootView; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); $appManager = \OC::$server->getAppManager(); @@ -89,7 +89,7 @@ class TrashbinTest extends \Test\TestCase { } - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { // cleanup test user $user = \OC::$server->getUserManager()->get(self::TEST_TRASHBIN_USER1); if ($user !== null) { @@ -111,7 +111,7 @@ class TrashbinTest extends \Test\TestCase { parent::tearDownAfterClass(); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC::$server->getAppManager()->enableApp('files_trashbin'); @@ -134,7 +134,7 @@ class TrashbinTest extends \Test\TestCase { self::loginHelper(self::TEST_TRASHBIN_USER1); } - protected function tearDown() { + protected function tearDown(): void { $this->restoreService('AllConfig'); // disable trashbin to be able to properly clean up \OC::$server->getAppManager()->disableApp('files_trashbin'); diff --git a/apps/files_versions/tests/Command/CleanupTest.php b/apps/files_versions/tests/Command/CleanupTest.php index 48720d2fbc..ace8e842e7 100644 --- a/apps/files_versions/tests/Command/CleanupTest.php +++ b/apps/files_versions/tests/Command/CleanupTest.php @@ -48,7 +48,7 @@ class CleanupTest extends TestCase { /** @var \PHPUnit_Framework_MockObject_MockObject | IRootFolder */ protected $rootFolder; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->rootFolder = $this->getMockBuilder('OCP\Files\IRootFolder') diff --git a/apps/files_versions/tests/Controller/PreviewControllerTest.php b/apps/files_versions/tests/Controller/PreviewControllerTest.php index 7c248b3634..e771b82a42 100644 --- a/apps/files_versions/tests/Controller/PreviewControllerTest.php +++ b/apps/files_versions/tests/Controller/PreviewControllerTest.php @@ -64,7 +64,7 @@ class PreviewControllerTest extends TestCase { /** @var IVersionManager|\PHPUnit_Framework_MockObject_MockObject */ private $versionManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->rootFolder = $this->createMock(IRootFolder::class); diff --git a/apps/files_versions/tests/VersioningTest.php b/apps/files_versions/tests/VersioningTest.php index b3023dbef6..d878ea9c3d 100644 --- a/apps/files_versions/tests/VersioningTest.php +++ b/apps/files_versions/tests/VersioningTest.php @@ -56,7 +56,7 @@ class VersioningTest extends \Test\TestCase { */ private $rootView; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); $application = new \OCA\Files_Sharing\AppInfo\Application(); @@ -67,7 +67,7 @@ class VersioningTest extends \Test\TestCase { self::loginHelper(self::TEST_VERSIONS_USER, true); } - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { // cleanup test user $user = \OC::$server->getUserManager()->get(self::TEST_VERSIONS_USER); if ($user !== null) { $user->delete(); } @@ -77,7 +77,7 @@ class VersioningTest extends \Test\TestCase { parent::tearDownAfterClass(); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = \OC::$server->getConfig(); @@ -105,7 +105,7 @@ class VersioningTest extends \Test\TestCase { } } - protected function tearDown() { + protected function tearDown(): void { $this->restoreService('AllConfig'); if ($this->rootView) { diff --git a/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php b/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php index 75096eefdd..3b18290ff8 100644 --- a/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php +++ b/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php @@ -48,7 +48,7 @@ class LoginRedirectorControllerTest extends TestCase { /** @var IL10N */ private $l; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/apps/oauth2/tests/Controller/OauthApiControllerTest.php b/apps/oauth2/tests/Controller/OauthApiControllerTest.php index 04fd3d6ecd..1c7bed848a 100644 --- a/apps/oauth2/tests/Controller/OauthApiControllerTest.php +++ b/apps/oauth2/tests/Controller/OauthApiControllerTest.php @@ -61,7 +61,7 @@ class OauthApiControllerTest extends TestCase { /** @var OauthApiController */ private $oauthApiController; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/apps/oauth2/tests/Controller/SettingsControllerTest.php b/apps/oauth2/tests/Controller/SettingsControllerTest.php index a14d7aad78..6519f9cf08 100644 --- a/apps/oauth2/tests/Controller/SettingsControllerTest.php +++ b/apps/oauth2/tests/Controller/SettingsControllerTest.php @@ -47,7 +47,7 @@ class SettingsControllerTest extends TestCase { /** @var SettingsController */ private $settingsController; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/apps/oauth2/tests/Db/AccessTokenMapperTest.php b/apps/oauth2/tests/Db/AccessTokenMapperTest.php index ebc6b55a38..8d60b10d14 100644 --- a/apps/oauth2/tests/Db/AccessTokenMapperTest.php +++ b/apps/oauth2/tests/Db/AccessTokenMapperTest.php @@ -32,7 +32,7 @@ class AccessTokenMapperTest extends TestCase { /** @var AccessTokenMapper */ private $accessTokenMapper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->accessTokenMapper = new AccessTokenMapper(\OC::$server->getDatabaseConnection()); } diff --git a/apps/oauth2/tests/Db/ClientMapperTest.php b/apps/oauth2/tests/Db/ClientMapperTest.php index 80d69c3b1b..78400672cb 100644 --- a/apps/oauth2/tests/Db/ClientMapperTest.php +++ b/apps/oauth2/tests/Db/ClientMapperTest.php @@ -32,7 +32,7 @@ class ClientMapperTest extends TestCase { /** @var ClientMapper */ private $clientMapper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->clientMapper = new ClientMapper(\OC::$server->getDatabaseConnection()); } diff --git a/apps/oauth2/tests/Settings/AdminTest.php b/apps/oauth2/tests/Settings/AdminTest.php index c6f7ab2a0e..ec8787db83 100644 --- a/apps/oauth2/tests/Settings/AdminTest.php +++ b/apps/oauth2/tests/Settings/AdminTest.php @@ -40,7 +40,7 @@ class AdminTest extends TestCase { /** @var ClientMapper|MockObject */ private $clientMapper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->initialStateService = $this->createMock(IInitialStateService::class); diff --git a/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php b/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php index c9b762d1fb..b7d40a6caa 100644 --- a/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php +++ b/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php @@ -44,7 +44,7 @@ class AppConfigControllerTest extends TestCase { /** @var IAppConfig|\PHPUnit_Framework_MockObject_MockObject */ private $appConfig; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/apps/provisioning_api/tests/Controller/AppsControllerTest.php b/apps/provisioning_api/tests/Controller/AppsControllerTest.php index 7bd20e4233..1056d3ba4c 100644 --- a/apps/provisioning_api/tests/Controller/AppsControllerTest.php +++ b/apps/provisioning_api/tests/Controller/AppsControllerTest.php @@ -48,7 +48,7 @@ class AppsControllerTest extends \OCA\Provisioning_API\Tests\TestCase { /** @var IUserSession */ private $userSession; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->appManager = \OC::$server->getAppManager(); diff --git a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php index b22953ca04..676b809169 100644 --- a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php +++ b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php @@ -62,7 +62,7 @@ class GroupsControllerTest extends \Test\TestCase { protected $api; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php index e47db4fd51..0c4fcd5071 100644 --- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php +++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php @@ -90,7 +90,7 @@ class UsersControllerTest extends TestCase { /** @var RemoteWipe|MockObject */ private $remoteWipe; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); diff --git a/apps/provisioning_api/tests/Middleware/ProvisioningApiMiddlewareTest.php b/apps/provisioning_api/tests/Middleware/ProvisioningApiMiddlewareTest.php index 5ebc43d2b1..70dad25058 100644 --- a/apps/provisioning_api/tests/Middleware/ProvisioningApiMiddlewareTest.php +++ b/apps/provisioning_api/tests/Middleware/ProvisioningApiMiddlewareTest.php @@ -35,7 +35,7 @@ class ProvisioningApiMiddlewareTest extends TestCase { /** @var IControllerMethodReflector|\PHPUnit_Framework_MockObject_MockObject */ private $reflector; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->reflector = $this->createMock(IControllerMethodReflector::class); diff --git a/apps/provisioning_api/tests/TestCase.php b/apps/provisioning_api/tests/TestCase.php index 7d65c5bc1b..72b7b9527e 100644 --- a/apps/provisioning_api/tests/TestCase.php +++ b/apps/provisioning_api/tests/TestCase.php @@ -40,7 +40,7 @@ abstract class TestCase extends \Test\TestCase { /** @var IGroupManager */ protected $groupManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = \OC::$server->getUserManager(); @@ -63,7 +63,7 @@ abstract class TestCase extends \Test\TestCase { return count($users) == 1 ? reset($users) : $users; } - protected function tearDown() { + protected function tearDown(): void { foreach($this->users as $user) { $user->delete(); } diff --git a/apps/settings/tests/Activity/SecurityFilterTest.php b/apps/settings/tests/Activity/SecurityFilterTest.php index f5d25608d6..2b7e3839e8 100644 --- a/apps/settings/tests/Activity/SecurityFilterTest.php +++ b/apps/settings/tests/Activity/SecurityFilterTest.php @@ -39,7 +39,7 @@ class SecurityFilterTest extends TestCase { /** @var SecurityFilter */ private $filter; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->urlGenerator = $this->createMock(IURLGenerator::class); diff --git a/apps/settings/tests/Activity/SecurityProviderTest.php b/apps/settings/tests/Activity/SecurityProviderTest.php index 143312addc..9b34015e94 100644 --- a/apps/settings/tests/Activity/SecurityProviderTest.php +++ b/apps/settings/tests/Activity/SecurityProviderTest.php @@ -46,7 +46,7 @@ class SecurityProviderTest extends TestCase { /** @var SecurityProvider */ private $provider; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->l10n = $this->createMock(IFactory::class); diff --git a/apps/settings/tests/Activity/SecuritySettingTest.php b/apps/settings/tests/Activity/SecuritySettingTest.php index 39ca3e2b79..805aa147be 100644 --- a/apps/settings/tests/Activity/SecuritySettingTest.php +++ b/apps/settings/tests/Activity/SecuritySettingTest.php @@ -33,7 +33,7 @@ class SecuritySettingTest extends TestCase { /** @var SecuritySetting */ private $setting; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->l10n = $this->createMock(IL10N::class); diff --git a/apps/settings/tests/AppInfo/ApplicationTest.php b/apps/settings/tests/AppInfo/ApplicationTest.php index 49ba48f10d..35ca711790 100644 --- a/apps/settings/tests/AppInfo/ApplicationTest.php +++ b/apps/settings/tests/AppInfo/ApplicationTest.php @@ -54,7 +54,7 @@ class ApplicationTest extends TestCase { /** @var IAppContainer */ protected $container; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->app = new Application(); $this->container = $this->app->getContainer(); diff --git a/apps/settings/tests/Controller/AdminSettingsControllerTest.php b/apps/settings/tests/Controller/AdminSettingsControllerTest.php index 2789fe0097..d3591c6d67 100644 --- a/apps/settings/tests/Controller/AdminSettingsControllerTest.php +++ b/apps/settings/tests/Controller/AdminSettingsControllerTest.php @@ -62,7 +62,7 @@ class AdminSettingsControllerTest extends TestCase { /** @var string */ private $adminUid = 'lololo'; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); @@ -87,7 +87,7 @@ class AdminSettingsControllerTest extends TestCase { \OC::$server->getGroupManager()->createGroup('admin')->addUser($user); } - public function tearDown() { + public function tearDown(): void { \OC::$server->getUserManager()->get($this->adminUid)->delete(); parent::tearDown(); diff --git a/apps/settings/tests/Controller/AppSettingsControllerTest.php b/apps/settings/tests/Controller/AppSettingsControllerTest.php index 9b09631226..508a39642a 100644 --- a/apps/settings/tests/Controller/AppSettingsControllerTest.php +++ b/apps/settings/tests/Controller/AppSettingsControllerTest.php @@ -76,7 +76,7 @@ class AppSettingsControllerTest extends TestCase { /** @var ILogger|MockObject */ private $logger; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/apps/settings/tests/Controller/AuthSettingsControllerTest.php b/apps/settings/tests/Controller/AuthSettingsControllerTest.php index ff698ffe22..435cd390f8 100644 --- a/apps/settings/tests/Controller/AuthSettingsControllerTest.php +++ b/apps/settings/tests/Controller/AuthSettingsControllerTest.php @@ -61,7 +61,7 @@ class AuthSettingsControllerTest extends TestCase { private $remoteWipe; private $uid = 'jane'; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/apps/settings/tests/Controller/CertificateControllerTest.php b/apps/settings/tests/Controller/CertificateControllerTest.php index ed0e7775dc..270e986e30 100644 --- a/apps/settings/tests/Controller/CertificateControllerTest.php +++ b/apps/settings/tests/Controller/CertificateControllerTest.php @@ -48,7 +48,7 @@ class CertificateControllerTest extends \Test\TestCase { /** @var ICertificateManager */ private $systemCertificateManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder(IRequest::class)->getMock(); diff --git a/apps/settings/tests/Controller/CheckSetupControllerTest.php b/apps/settings/tests/Controller/CheckSetupControllerTest.php index 4d6a4c21f0..b038cf2af3 100644 --- a/apps/settings/tests/Controller/CheckSetupControllerTest.php +++ b/apps/settings/tests/Controller/CheckSetupControllerTest.php @@ -87,7 +87,7 @@ class CheckSetupControllerTest extends TestCase { */ private $dirsToRemove = []; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder(IRequest::class) diff --git a/apps/settings/tests/Controller/MailSettingsControllerTest.php b/apps/settings/tests/Controller/MailSettingsControllerTest.php index 1607926219..8440df6ec4 100644 --- a/apps/settings/tests/Controller/MailSettingsControllerTest.php +++ b/apps/settings/tests/Controller/MailSettingsControllerTest.php @@ -41,7 +41,7 @@ class MailSettingsControllerTest extends \Test\TestCase { /** @var MailSettingsController */ private $mailController; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->l = $this->createMock(IL10N::class); diff --git a/apps/settings/tests/Controller/TwoFactorSettingsControllerTest.php b/apps/settings/tests/Controller/TwoFactorSettingsControllerTest.php index 58b82bc093..d77f2303a6 100644 --- a/apps/settings/tests/Controller/TwoFactorSettingsControllerTest.php +++ b/apps/settings/tests/Controller/TwoFactorSettingsControllerTest.php @@ -41,7 +41,7 @@ class TwoFactorSettingsControllerTest extends TestCase { /** @var TwoFactorSettingsController */ private $controller; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/apps/settings/tests/Controller/UsersControllerTest.php b/apps/settings/tests/Controller/UsersControllerTest.php index 5ca45297c5..eb5790a040 100644 --- a/apps/settings/tests/Controller/UsersControllerTest.php +++ b/apps/settings/tests/Controller/UsersControllerTest.php @@ -74,7 +74,7 @@ class UsersControllerTest extends \Test\TestCase { /** @var IEncryptionModule | \PHPUnit_Framework_MockObject_MockObject */ private $encryptionModule; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); diff --git a/apps/settings/tests/Mailer/NewUserMailHelperTest.php b/apps/settings/tests/Mailer/NewUserMailHelperTest.php index f99af1e2f9..77d606a953 100644 --- a/apps/settings/tests/Mailer/NewUserMailHelperTest.php +++ b/apps/settings/tests/Mailer/NewUserMailHelperTest.php @@ -57,7 +57,7 @@ class NewUserMailHelperTest extends TestCase { /** @var \OCA\Settings\Mailer\NewUserMailHelper */ private $newUserMailHelper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->defaults = $this->createMock(Defaults::class); diff --git a/apps/settings/tests/Middleware/SubadminMiddlewareTest.php b/apps/settings/tests/Middleware/SubadminMiddlewareTest.php index 752184bf7c..e2434c01b0 100644 --- a/apps/settings/tests/Middleware/SubadminMiddlewareTest.php +++ b/apps/settings/tests/Middleware/SubadminMiddlewareTest.php @@ -35,7 +35,7 @@ class SubadminMiddlewareTest extends \Test\TestCase { /** @var IL10N */ private $l10n; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->reflector = $this->getMockBuilder(ControllerMethodReflector::class) ->disableOriginalConstructor()->getMock(); diff --git a/apps/settings/tests/Personal/Security/AuthtokensTest.php b/apps/settings/tests/Personal/Security/AuthtokensTest.php index 8cb394101e..d0af05df91 100644 --- a/apps/settings/tests/Personal/Security/AuthtokensTest.php +++ b/apps/settings/tests/Personal/Security/AuthtokensTest.php @@ -52,7 +52,7 @@ class AuthtokensTest extends TestCase { /** @var Security\Authtokens */ private $section; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->authTokenProvider = $this->createMock(IAuthTokenProvider::class); diff --git a/apps/settings/tests/Settings/Admin/MailTest.php b/apps/settings/tests/Settings/Admin/MailTest.php index 5e26454a6f..1b47dc874c 100644 --- a/apps/settings/tests/Settings/Admin/MailTest.php +++ b/apps/settings/tests/Settings/Admin/MailTest.php @@ -34,7 +34,7 @@ class MailTest extends TestCase { /** @var IConfig */ private $config; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); diff --git a/apps/settings/tests/Settings/Admin/SecurityTest.php b/apps/settings/tests/Settings/Admin/SecurityTest.php index ea9222ab1a..778690de1c 100644 --- a/apps/settings/tests/Settings/Admin/SecurityTest.php +++ b/apps/settings/tests/Settings/Admin/SecurityTest.php @@ -44,7 +44,7 @@ class SecurityTest extends TestCase { /** @var IInitialStateService|MockObject */ private $initialState; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->manager = $this->getMockBuilder(Manager::class)->disableOriginalConstructor()->getMock(); $this->userManager = $this->getMockBuilder(IUserManager::class)->getMock(); diff --git a/apps/settings/tests/Settings/Admin/ServerTest.php b/apps/settings/tests/Settings/Admin/ServerTest.php index bcb990b6b6..57c984fdb1 100644 --- a/apps/settings/tests/Settings/Admin/ServerTest.php +++ b/apps/settings/tests/Settings/Admin/ServerTest.php @@ -34,7 +34,7 @@ class ServerTest extends TestCase { /** @var IConfig */ private $config; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/apps/settings/tests/Settings/Admin/SharingTest.php b/apps/settings/tests/Settings/Admin/SharingTest.php index 91b2edf14b..37046d9d31 100644 --- a/apps/settings/tests/Settings/Admin/SharingTest.php +++ b/apps/settings/tests/Settings/Admin/SharingTest.php @@ -42,7 +42,7 @@ class SharingTest extends TestCase { /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */ private $shareManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); $this->l10n = $this->getMockBuilder(IL10N::class)->getMock(); diff --git a/apps/settings/tests/Settings/Personal/SecurityTest.php b/apps/settings/tests/Settings/Personal/SecurityTest.php index a55469c21e..671fcd6f9b 100644 --- a/apps/settings/tests/Settings/Personal/SecurityTest.php +++ b/apps/settings/tests/Settings/Personal/SecurityTest.php @@ -58,7 +58,7 @@ class SecurityTest extends TestCase { /** @var Security */ private $section; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->initialStateService = $this->createMock(IInitialStateService::class); diff --git a/apps/sharebymail/tests/CapabilitiesTest.php b/apps/sharebymail/tests/CapabilitiesTest.php index b154599419..96fce010c1 100644 --- a/apps/sharebymail/tests/CapabilitiesTest.php +++ b/apps/sharebymail/tests/CapabilitiesTest.php @@ -26,7 +26,7 @@ class CapabilitiesTest extends TestCase { /** @var Capabilities */ private $capabilities; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->capabilities = new Capabilities(); diff --git a/apps/sharebymail/tests/SettingsTest.php b/apps/sharebymail/tests/SettingsTest.php index b7150e6c6d..12d8fc4d91 100644 --- a/apps/sharebymail/tests/SettingsTest.php +++ b/apps/sharebymail/tests/SettingsTest.php @@ -34,7 +34,7 @@ class SettingsTest extends TestCase { /** @var SettingsManager | \PHPUnit_Framework_MockObject_MockObject */ private $settingsManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->settingsManager = $this->getMockBuilder(SettingsManager::class) diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php index 744c2d6f3e..8adc249ee6 100644 --- a/apps/sharebymail/tests/ShareByMailProviderTest.php +++ b/apps/sharebymail/tests/ShareByMailProviderTest.php @@ -97,7 +97,7 @@ class ShareByMailProviderTest extends TestCase { /** @var CapabilitiesManager | \PHPUnit_Framework_MockObject_MockObject */ private $capabilitiesManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->shareManager = \OC::$server->getShareManager(); @@ -174,10 +174,10 @@ class ShareByMailProviderTest extends TestCase { } - public function tearDown() { + public function tearDown(): void { $this->connection->getQueryBuilder()->delete('share')->execute(); - return parent::tearDown(); + parent::tearDown(); } public function testCreate() { diff --git a/apps/systemtags/tests/Activity/SettingTest.php b/apps/systemtags/tests/Activity/SettingTest.php index 40fcea750a..0cb6f50537 100644 --- a/apps/systemtags/tests/Activity/SettingTest.php +++ b/apps/systemtags/tests/Activity/SettingTest.php @@ -29,7 +29,7 @@ class SettingTest extends TestCase { /** @var Setting */ private $setting; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->l = $this->createMock(IL10N::class); diff --git a/apps/systemtags/tests/Settings/AdminTest.php b/apps/systemtags/tests/Settings/AdminTest.php index 6e23ab5f7b..b9b7fb60f8 100644 --- a/apps/systemtags/tests/Settings/AdminTest.php +++ b/apps/systemtags/tests/Settings/AdminTest.php @@ -32,7 +32,7 @@ class AdminTest extends TestCase { /** @var Admin */ private $admin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->admin = new Admin(); diff --git a/apps/theming/tests/CapabilitiesTest.php b/apps/theming/tests/CapabilitiesTest.php index f007de1dbd..76dd680b49 100644 --- a/apps/theming/tests/CapabilitiesTest.php +++ b/apps/theming/tests/CapabilitiesTest.php @@ -55,7 +55,7 @@ class CapabilitiesTest extends TestCase { /** @var Capabilities */ protected $capabilities; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->theming = $this->createMock(ThemingDefaults::class); diff --git a/apps/theming/tests/Controller/IconControllerTest.php b/apps/theming/tests/Controller/IconControllerTest.php index 85259b9abe..df0fdd52b3 100644 --- a/apps/theming/tests/Controller/IconControllerTest.php +++ b/apps/theming/tests/Controller/IconControllerTest.php @@ -61,7 +61,7 @@ class IconControllerTest extends TestCase { /** @var ImageManager */ private $imageManager; - public function setUp() { + public function setUp(): void { $this->request = $this->createMock(IRequest::class); $this->themingDefaults = $this->createMock(ThemingDefaults::class); $this->iconBuilder = $this->createMock(IconBuilder::class); diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php index 63e5d1e285..a626fdebe6 100644 --- a/apps/theming/tests/Controller/ThemingControllerTest.php +++ b/apps/theming/tests/Controller/ThemingControllerTest.php @@ -83,7 +83,7 @@ class ThemingControllerTest extends TestCase { /** @var IURLGenerator */ private $urlGenerator; - public function setUp() { + public function setUp(): void { $this->request = $this->createMock(IRequest::class); $this->config = $this->createMock(IConfig::class); $this->themingDefaults = $this->createMock(ThemingDefaults::class); @@ -118,7 +118,7 @@ class ThemingControllerTest extends TestCase { $this->imageManager ); - return parent::setUp(); + parent::setUp(); } public function dataUpdateStylesheetSuccess() { diff --git a/apps/theming/tests/IconBuilderTest.php b/apps/theming/tests/IconBuilderTest.php index 69ec649560..a6999c331c 100644 --- a/apps/theming/tests/IconBuilderTest.php +++ b/apps/theming/tests/IconBuilderTest.php @@ -54,7 +54,7 @@ class IconBuilderTest extends TestCase { /** @var IAppManager */ protected $appManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/apps/theming/tests/ImageManagerTest.php b/apps/theming/tests/ImageManagerTest.php index 0f03c565e9..56fa63bea7 100644 --- a/apps/theming/tests/ImageManagerTest.php +++ b/apps/theming/tests/ImageManagerTest.php @@ -51,7 +51,7 @@ class ImageManagerTest extends TestCase { /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ private $logger; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); $this->appData = $this->createMock(IAppData::class); diff --git a/apps/theming/tests/ServicesTest.php b/apps/theming/tests/ServicesTest.php index a46e28235f..b274e5868d 100644 --- a/apps/theming/tests/ServicesTest.php +++ b/apps/theming/tests/ServicesTest.php @@ -49,7 +49,7 @@ class ServicesTest extends TestCase { /** @var \OCP\AppFramework\IAppContainer */ protected $container; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->app = new App('theming'); $this->container = $this->app->getContainer(); diff --git a/apps/theming/tests/Settings/AdminTest.php b/apps/theming/tests/Settings/AdminTest.php index 5943866edc..4e89366c3f 100644 --- a/apps/theming/tests/Settings/AdminTest.php +++ b/apps/theming/tests/Settings/AdminTest.php @@ -50,7 +50,7 @@ class AdminTest extends TestCase { /** @var IL10N */ private $l10n; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); $this->l10n = $this->createMock(IL10N::class); diff --git a/apps/theming/tests/Settings/SectionTest.php b/apps/theming/tests/Settings/SectionTest.php index 09abf9e34f..10d6bb172f 100644 --- a/apps/theming/tests/Settings/SectionTest.php +++ b/apps/theming/tests/Settings/SectionTest.php @@ -37,7 +37,7 @@ class SectionTest extends TestCase { /** @var Section */ private $section; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->url = $this->createMock(IURLGenerator::class); $this->l = $this->createMock(IL10N::class); diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php index 71b8ba97e9..b7413eaf47 100644 --- a/apps/theming/tests/ThemingDefaultsTest.php +++ b/apps/theming/tests/ThemingDefaultsTest.php @@ -72,7 +72,7 @@ class ThemingDefaultsTest extends TestCase { /** @var INavigationManager|\PHPUnit_Framework_MockObject_MockObject */ private $navigationManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); $this->l10n = $this->createMock(IL10N::class); diff --git a/apps/theming/tests/UtilTest.php b/apps/theming/tests/UtilTest.php index 9fa5dd91da..f8e1750113 100644 --- a/apps/theming/tests/UtilTest.php +++ b/apps/theming/tests/UtilTest.php @@ -46,7 +46,7 @@ class UtilTest extends TestCase { /** @var IAppManager */ protected $appManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); $this->appData = $this->createMock(IAppData::class); diff --git a/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php b/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php index 76cdac3c21..a537600003 100644 --- a/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php +++ b/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php @@ -49,7 +49,7 @@ class BackupCodeMapperTest extends TestCase { $qb->execute(); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->db = \OC::$server->getDatabaseConnection(); @@ -58,7 +58,7 @@ class BackupCodeMapperTest extends TestCase { $this->resetDB(); } - protected function tearDown() { + protected function tearDown(): void { parent::tearDown(); $this->resetDB(); diff --git a/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php b/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php index 679f111a75..872a46b625 100644 --- a/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php +++ b/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php @@ -41,7 +41,7 @@ class BackupCodeStorageTest extends TestCase { /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */ private $notificationManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->storage = \OC::$server->query(BackupCodeStorage::class); diff --git a/apps/twofactor_backupcodes/tests/Unit/Activity/ProviderTest.php b/apps/twofactor_backupcodes/tests/Unit/Activity/ProviderTest.php index 17d332691d..27a6e3f877 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Activity/ProviderTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Activity/ProviderTest.php @@ -46,7 +46,7 @@ class ProviderTest extends TestCase { /** @var Provider */ private $provider; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->l10n = $this->createMock(IFactory::class); diff --git a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php index 235414ffe7..2e68c0e427 100644 --- a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php @@ -55,7 +55,7 @@ class CheckBackupCodeTest extends TestCase { /** @var CheckBackupCodes */ private $checkBackupCodes; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); diff --git a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php index fe68da8ebf..a6dda9ce6a 100644 --- a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php @@ -54,7 +54,7 @@ class RememberBackupCodesJobTest extends TestCase { /** @var RememberBackupCodesJob */ private $job; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->registry = $this->createMock(IRegistry::class); diff --git a/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php b/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php index 4c4fde1e0b..c8274f9494 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php @@ -44,7 +44,7 @@ class SettingsControllerTest extends TestCase { /** @var SettingsController */ private $controller; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder(IRequest::class)->getMock(); diff --git a/apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php b/apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php index 44ea88cdb0..65a5a8b61c 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php @@ -46,7 +46,7 @@ class ActivityPublisherTest extends TestCase { /** @var ActivityPublisher */ private $listener; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->activityManager = $this->createMock(IManager::class); diff --git a/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php b/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php index 21dde19d32..cfa3799bb2 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php @@ -40,7 +40,7 @@ class ClearNotificationsTest extends TestCase { /** @var ClearNotifications */ private $listener; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->notificationManager = $this->createMock(IManager::class); diff --git a/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderDisabledTest.php b/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderDisabledTest.php index c357fdeb2f..05ef1cdb10 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderDisabledTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderDisabledTest.php @@ -44,7 +44,7 @@ class ProviderDisabledTest extends TestCase { /** @var ProviderDisabled */ private $listener; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->registy = $this->createMock(IRegistry::class); diff --git a/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderEnabledTest.php b/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderEnabledTest.php index 8a4ce56d7c..ef35705023 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderEnabledTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderEnabledTest.php @@ -44,7 +44,7 @@ class ProviderEnabledTest extends TestCase { /** @var ProviderEnabled */ private $listener; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->registy = $this->createMock(IRegistry::class); diff --git a/apps/twofactor_backupcodes/tests/Unit/Listener/RegistryUpdaterTest.php b/apps/twofactor_backupcodes/tests/Unit/Listener/RegistryUpdaterTest.php index 7ae6eab335..6d91ea36ee 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Listener/RegistryUpdaterTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Listener/RegistryUpdaterTest.php @@ -43,7 +43,7 @@ class RegistryUpdaterTest extends TestCase { /** @var RegistryUpdater */ private $listener; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->registry = $this->createMock(IRegistry::class); diff --git a/apps/twofactor_backupcodes/tests/Unit/Migration/CheckBackupCodeTest.php b/apps/twofactor_backupcodes/tests/Unit/Migration/CheckBackupCodeTest.php index 3c36a35f7c..6f9834aecb 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Migration/CheckBackupCodeTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Migration/CheckBackupCodeTest.php @@ -36,7 +36,7 @@ class CheckBackupCodeTest extends TestCase { /** @var CheckBackupCodes */ private $checkBackupsCodes; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->jobList = $this->createMock(IJobList::class); diff --git a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php index 0f03fba7de..0bbdc8619b 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php @@ -43,7 +43,7 @@ class NotifierTest extends TestCase { /** @var IL10N|MockObject */ protected $l; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->l = $this->createMock(IL10N::class); diff --git a/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php b/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php index 4dab536c55..ea9f7b9582 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php @@ -52,7 +52,7 @@ class BackupCodesProviderTest extends TestCase { /** @var BackupCodesProvider */ private $provider; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->appName = "twofactor_backupcodes"; diff --git a/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php b/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php index 7c662d3ef8..f635fc6535 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php @@ -50,7 +50,7 @@ class BackupCodeStorageTest extends TestCase { /** @var BackupCodeStorage */ private $storage; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->mapper = $this->createMock(BackupCodeMapper::class); diff --git a/apps/updatenotification/tests/Controller/AdminControllerTest.php b/apps/updatenotification/tests/Controller/AdminControllerTest.php index 98b08e633b..38baeb907b 100644 --- a/apps/updatenotification/tests/Controller/AdminControllerTest.php +++ b/apps/updatenotification/tests/Controller/AdminControllerTest.php @@ -52,7 +52,7 @@ class AdminControllerTest extends TestCase { /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ private $l10n; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/apps/updatenotification/tests/Notification/BackgroundJobTest.php b/apps/updatenotification/tests/Notification/BackgroundJobTest.php index 694051d33f..9e35194f06 100644 --- a/apps/updatenotification/tests/Notification/BackgroundJobTest.php +++ b/apps/updatenotification/tests/Notification/BackgroundJobTest.php @@ -52,7 +52,7 @@ class BackgroundJobTest extends TestCase { /** @var Installer|\PHPUnit_Framework_MockObject_MockObject */ protected $installer; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/apps/updatenotification/tests/Notification/NotifierTest.php b/apps/updatenotification/tests/Notification/NotifierTest.php index f97ff776c9..d7a3fbbb14 100644 --- a/apps/updatenotification/tests/Notification/NotifierTest.php +++ b/apps/updatenotification/tests/Notification/NotifierTest.php @@ -50,7 +50,7 @@ class NotifierTest extends TestCase { /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */ protected $groupManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->urlGenerator = $this->createMock(IURLGenerator::class); diff --git a/apps/updatenotification/tests/ResetTokenBackgroundJobTest.php b/apps/updatenotification/tests/ResetTokenBackgroundJobTest.php index d78a5ed94c..c604da8570 100644 --- a/apps/updatenotification/tests/ResetTokenBackgroundJobTest.php +++ b/apps/updatenotification/tests/ResetTokenBackgroundJobTest.php @@ -37,7 +37,7 @@ class ResetTokenBackgroundJobTest extends TestCase { /** @var ResetTokenBackgroundJob */ private $resetTokenBackgroundJob; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); $this->timeFactory = $this->createMock(ITimeFactory::class); diff --git a/apps/updatenotification/tests/Settings/AdminTest.php b/apps/updatenotification/tests/Settings/AdminTest.php index d2d4b503ba..a0b7c4b0fe 100644 --- a/apps/updatenotification/tests/Settings/AdminTest.php +++ b/apps/updatenotification/tests/Settings/AdminTest.php @@ -55,7 +55,7 @@ class AdminTest extends TestCase { /** @var IRegistry|\PHPUnit_Framework_MockObject_MockObject */ private $subscriptionRegistry; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/apps/updatenotification/tests/UpdateCheckerTest.php b/apps/updatenotification/tests/UpdateCheckerTest.php index fc70d2d945..1ad4507455 100644 --- a/apps/updatenotification/tests/UpdateCheckerTest.php +++ b/apps/updatenotification/tests/UpdateCheckerTest.php @@ -38,7 +38,7 @@ class UpdateCheckerTest extends TestCase { /** @var UpdateChecker */ private $updateChecker; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->updater = $this->createMock(VersionCheck::class); diff --git a/apps/user_ldap/tests/AccessTest.php b/apps/user_ldap/tests/AccessTest.php index a51a396cff..0d327ce2e0 100644 --- a/apps/user_ldap/tests/AccessTest.php +++ b/apps/user_ldap/tests/AccessTest.php @@ -78,7 +78,7 @@ class AccessTest extends TestCase { /** @var Access */ private $access; - public function setUp() { + public function setUp(): void { $this->connection = $this->createMock(Connection::class); $this->ldap = $this->createMock(LDAP::class); $this->userManager = $this->createMock(Manager::class); diff --git a/apps/user_ldap/tests/ConfigurationTest.php b/apps/user_ldap/tests/ConfigurationTest.php index 6e45f16386..5820fff25e 100644 --- a/apps/user_ldap/tests/ConfigurationTest.php +++ b/apps/user_ldap/tests/ConfigurationTest.php @@ -29,7 +29,7 @@ class ConfigurationTest extends \Test\TestCase { /** @var Configuration */ protected $configuration; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->configuration = new Configuration('t01', false); } diff --git a/apps/user_ldap/tests/ConnectionTest.php b/apps/user_ldap/tests/ConnectionTest.php index 7a5da72fcd..f08b5d9bf1 100644 --- a/apps/user_ldap/tests/ConnectionTest.php +++ b/apps/user_ldap/tests/ConnectionTest.php @@ -44,7 +44,7 @@ class ConnectionTest extends \Test\TestCase { /** @var Connection */ protected $connection; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->ldap = $this->createMock(ILDAPWrapper::class); diff --git a/apps/user_ldap/tests/HelperTest.php b/apps/user_ldap/tests/HelperTest.php index 54d7d8868c..3804938199 100644 --- a/apps/user_ldap/tests/HelperTest.php +++ b/apps/user_ldap/tests/HelperTest.php @@ -36,7 +36,7 @@ class HelperTest extends \Test\TestCase { /** @var Helper */ private $helper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php b/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php index 38f575db75..493aa49c46 100644 --- a/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php +++ b/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php @@ -94,7 +94,7 @@ class ExceptionOnLostConnection { * * @throws \Exception */ - public function setUp() { + public function setUp(): void { require_once __DIR__ . '/../../../../lib/base.php'; \OC_App::loadApps(['user_ldap']); diff --git a/apps/user_ldap/tests/Jobs/SyncTest.php b/apps/user_ldap/tests/Jobs/SyncTest.php index 75ffd0e828..d16ce6672d 100644 --- a/apps/user_ldap/tests/Jobs/SyncTest.php +++ b/apps/user_ldap/tests/Jobs/SyncTest.php @@ -69,7 +69,7 @@ class SyncTest extends TestCase { /** @var AccessFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $accessFactory; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->helper = $this->createMock(Helper::class); diff --git a/apps/user_ldap/tests/LDAPProviderTest.php b/apps/user_ldap/tests/LDAPProviderTest.php index deaa368806..cbce73be29 100644 --- a/apps/user_ldap/tests/LDAPProviderTest.php +++ b/apps/user_ldap/tests/LDAPProviderTest.php @@ -43,7 +43,7 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; */ class LDAPProviderTest extends \Test\TestCase { - protected function setUp() { + protected function setUp(): void { parent::setUp(); } diff --git a/apps/user_ldap/tests/LDAPTest.php b/apps/user_ldap/tests/LDAPTest.php index 3e754dbd27..a6c097c6f8 100644 --- a/apps/user_ldap/tests/LDAPTest.php +++ b/apps/user_ldap/tests/LDAPTest.php @@ -30,7 +30,7 @@ class LDAPTest extends TestCase { /** @var LDAP|\PHPUnit_Framework_MockObject_MockObject */ private $ldap; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->ldap = $this->getMockBuilder(LDAP::class) ->setMethods(['invokeLDAPMethod']) diff --git a/apps/user_ldap/tests/Migration/AbstractUUIDFixTest.php b/apps/user_ldap/tests/Migration/AbstractUUIDFixTest.php index 37502027df..323a3464ce 100644 --- a/apps/user_ldap/tests/Migration/AbstractUUIDFixTest.php +++ b/apps/user_ldap/tests/Migration/AbstractUUIDFixTest.php @@ -58,7 +58,7 @@ abstract class AbstractUUIDFixTest extends TestCase { /** @var bool */ protected $isUser = true; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->ldap = $this->createMock(LDAP::class); diff --git a/apps/user_ldap/tests/Migration/UUIDFixGroupTest.php b/apps/user_ldap/tests/Migration/UUIDFixGroupTest.php index a85c4a4dc5..c0bbd8098b 100644 --- a/apps/user_ldap/tests/Migration/UUIDFixGroupTest.php +++ b/apps/user_ldap/tests/Migration/UUIDFixGroupTest.php @@ -35,7 +35,7 @@ use OCA\User_LDAP\Tests\Migration\AbstractUUIDFixTest; * @group DB */ class UUIDFixGroupTest extends AbstractUUIDFixTest { - public function setUp() { + public function setUp(): void { $this->isUser = false; parent::setUp(); diff --git a/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php b/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php index 0536d0b10a..32f601f2b1 100644 --- a/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php +++ b/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php @@ -47,7 +47,7 @@ class UUIDFixInsertTest extends TestCase { /** @var UUIDFixInsert */ protected $job; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->jobList = $this->createMock(IJobList::class); diff --git a/apps/user_ldap/tests/Migration/UUIDFixUserTest.php b/apps/user_ldap/tests/Migration/UUIDFixUserTest.php index 193e460c3c..8e91a00156 100644 --- a/apps/user_ldap/tests/Migration/UUIDFixUserTest.php +++ b/apps/user_ldap/tests/Migration/UUIDFixUserTest.php @@ -34,7 +34,7 @@ use OCA\User_LDAP\User_Proxy; * @group DB */ class UUIDFixUserTest extends AbstractUUIDFixTest { - public function setUp() { + public function setUp(): void { $this->isUser = true; parent::setUp(); diff --git a/apps/user_ldap/tests/Settings/AdminTest.php b/apps/user_ldap/tests/Settings/AdminTest.php index 84004b9d46..d421c379bf 100644 --- a/apps/user_ldap/tests/Settings/AdminTest.php +++ b/apps/user_ldap/tests/Settings/AdminTest.php @@ -43,7 +43,7 @@ class AdminTest extends TestCase { /** @var IL10N */ private $l10n; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->l10n = $this->getMockBuilder(IL10N::class)->getMock(); diff --git a/apps/user_ldap/tests/Settings/SectionTest.php b/apps/user_ldap/tests/Settings/SectionTest.php index 65dff000af..0bd7a8010b 100644 --- a/apps/user_ldap/tests/Settings/SectionTest.php +++ b/apps/user_ldap/tests/Settings/SectionTest.php @@ -37,7 +37,7 @@ class SectionTest extends TestCase { /** @var Section */ private $section; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->url = $this->createMock(IURLGenerator::class); $this->l = $this->createMock(IL10N::class); diff --git a/apps/user_ldap/tests/User/DeletedUsersIndexTest.php b/apps/user_ldap/tests/User/DeletedUsersIndexTest.php index 916b5119ce..e81a81f742 100644 --- a/apps/user_ldap/tests/User/DeletedUsersIndexTest.php +++ b/apps/user_ldap/tests/User/DeletedUsersIndexTest.php @@ -48,7 +48,7 @@ class DeletedUsersIndexTest extends \Test\TestCase { /** @var UserMapping|\PHPUnit_Framework_MockObject_MockObject */ protected $mapping; - public function setUp() { + public function setUp(): void { parent::setUp(); // no mocks for those as tests go against DB @@ -63,9 +63,9 @@ class DeletedUsersIndexTest extends \Test\TestCase { $this->dui = new DeletedUsersIndex($this->config, $this->db, $this->mapping); } - public function tearDown() { + public function tearDown(): void { $this->config->deleteAppFromAllUsers('user_ldap'); - return parent::tearDown(); + parent::tearDown(); } public function testMarkAndFetchUser() { diff --git a/apps/user_ldap/tests/User/ManagerTest.php b/apps/user_ldap/tests/User/ManagerTest.php index 1fb548f59b..a8abd1e466 100644 --- a/apps/user_ldap/tests/User/ManagerTest.php +++ b/apps/user_ldap/tests/User/ManagerTest.php @@ -86,7 +86,7 @@ class ManagerTest extends \Test\TestCase { /** @var Manager */ protected $manager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->access = $this->createMock(Access::class); diff --git a/apps/user_ldap/tests/User/UserTest.php b/apps/user_ldap/tests/User/UserTest.php index c4563bf1f3..992d3ce990 100644 --- a/apps/user_ldap/tests/User/UserTest.php +++ b/apps/user_ldap/tests/User/UserTest.php @@ -76,7 +76,7 @@ class UserTest extends \Test\TestCase { /** @var User */ protected $user; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = $this->createMock(Connection::class); diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php index 6671742c42..e8076a051a 100644 --- a/apps/user_ldap/tests/User_LDAPTest.php +++ b/apps/user_ldap/tests/User_LDAPTest.php @@ -76,7 +76,7 @@ class User_LDAPTest extends TestCase { /** @var Manager|\PHPUnit_Framework_MockObject_MockObject */ protected $userManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC_User::clearBackends(); diff --git a/apps/user_ldap/tests/User_ProxyTest.php b/apps/user_ldap/tests/User_ProxyTest.php index 126391401e..02a1815804 100644 --- a/apps/user_ldap/tests/User_ProxyTest.php +++ b/apps/user_ldap/tests/User_ProxyTest.php @@ -49,7 +49,7 @@ class User_ProxyTest extends TestCase { /** @var UserPluginManager|\PHPUnit_Framework_MockObject_MockObject */ private $userPluginManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->ldapWrapper = $this->createMock(ILDAPWrapper::class); diff --git a/apps/user_ldap/tests/WizardTest.php b/apps/user_ldap/tests/WizardTest.php index 1cae2f58e5..05b0c5a944 100644 --- a/apps/user_ldap/tests/WizardTest.php +++ b/apps/user_ldap/tests/WizardTest.php @@ -42,7 +42,7 @@ use Test\TestCase; * @package OCA\User_LDAP\Tests */ class WizardTest extends TestCase { - protected function setUp() { + protected function setUp(): void { parent::setUp(); //we need to make sure the consts are defined, otherwise tests will fail //on systems without php5_ldap diff --git a/apps/workflowengine/tests/Check/RequestRemoteAddressTest.php b/apps/workflowengine/tests/Check/RequestRemoteAddressTest.php index 9e313122a1..c986a2daab 100644 --- a/apps/workflowengine/tests/Check/RequestRemoteAddressTest.php +++ b/apps/workflowengine/tests/Check/RequestRemoteAddressTest.php @@ -44,7 +44,7 @@ class RequestRemoteAddressTest extends \Test\TestCase { return $l; } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder(IRequest::class) diff --git a/apps/workflowengine/tests/Check/RequestTimeTest.php b/apps/workflowengine/tests/Check/RequestTimeTest.php index 519b5112f3..d8628b7c6f 100644 --- a/apps/workflowengine/tests/Check/RequestTimeTest.php +++ b/apps/workflowengine/tests/Check/RequestTimeTest.php @@ -43,7 +43,7 @@ class RequestTimeTest extends \Test\TestCase { return $l; } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->timeFactory = $this->getMockBuilder('OCP\AppFramework\Utility\ITimeFactory') diff --git a/apps/workflowengine/tests/Check/RequestUserAgentTest.php b/apps/workflowengine/tests/Check/RequestUserAgentTest.php index fe9da844cc..79e3de4487 100644 --- a/apps/workflowengine/tests/Check/RequestUserAgentTest.php +++ b/apps/workflowengine/tests/Check/RequestUserAgentTest.php @@ -34,7 +34,7 @@ class RequestUserAgentTest extends TestCase { /** @var RequestUserAgent */ protected $check; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/apps/workflowengine/tests/ManagerTest.php b/apps/workflowengine/tests/ManagerTest.php index 92111a6989..0f142e642e 100644 --- a/apps/workflowengine/tests/ManagerTest.php +++ b/apps/workflowengine/tests/ManagerTest.php @@ -64,7 +64,7 @@ class ManagerTest extends TestCase { /** @var MockObject|L10N */ protected $l; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->db = \OC::$server->getDatabaseConnection(); @@ -91,7 +91,7 @@ class ManagerTest extends TestCase { $this->clearTables(); } - protected function tearDown() { + protected function tearDown(): void { $this->clearTables(); parent::tearDown(); } diff --git a/tests/Core/Command/Apps/AppsDisableTest.php b/tests/Core/Command/Apps/AppsDisableTest.php index d9c43a79c2..f066eaba40 100644 --- a/tests/Core/Command/Apps/AppsDisableTest.php +++ b/tests/Core/Command/Apps/AppsDisableTest.php @@ -36,7 +36,7 @@ class AppsDisableTest extends TestCase { /** @var CommandTester */ private $commandTester; - public function setUp() { + public function setUp(): void { parent::setUp(); $command = new Disable( diff --git a/tests/Core/Command/Apps/AppsEnableTest.php b/tests/Core/Command/Apps/AppsEnableTest.php index d2bda14130..a30bef5932 100644 --- a/tests/Core/Command/Apps/AppsEnableTest.php +++ b/tests/Core/Command/Apps/AppsEnableTest.php @@ -36,7 +36,7 @@ class AppsEnableTest extends TestCase { /** @var CommandTester */ private $commandTester; - public function setUp() { + public function setUp(): void { parent::setUp(); $command = new Enable( diff --git a/tests/Core/Command/Config/App/DeleteConfigTest.php b/tests/Core/Command/Config/App/DeleteConfigTest.php index f74fd73d69..251de227d6 100644 --- a/tests/Core/Command/Config/App/DeleteConfigTest.php +++ b/tests/Core/Command/Config/App/DeleteConfigTest.php @@ -40,7 +40,7 @@ class DeleteConfigTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class) diff --git a/tests/Core/Command/Config/App/GetConfigTest.php b/tests/Core/Command/Config/App/GetConfigTest.php index 7ea3fbb587..7ecb09b8f8 100644 --- a/tests/Core/Command/Config/App/GetConfigTest.php +++ b/tests/Core/Command/Config/App/GetConfigTest.php @@ -40,7 +40,7 @@ class GetConfigTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->config = $this->getMockBuilder(IConfig::class) diff --git a/tests/Core/Command/Config/App/SetConfigTest.php b/tests/Core/Command/Config/App/SetConfigTest.php index f66390871d..988e965d31 100644 --- a/tests/Core/Command/Config/App/SetConfigTest.php +++ b/tests/Core/Command/Config/App/SetConfigTest.php @@ -40,7 +40,7 @@ class SetConfigTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->config = $this->getMockBuilder(IConfig::class) diff --git a/tests/Core/Command/Config/ImportTest.php b/tests/Core/Command/Config/ImportTest.php index 7afa47d353..fa1ed15167 100644 --- a/tests/Core/Command/Config/ImportTest.php +++ b/tests/Core/Command/Config/ImportTest.php @@ -40,7 +40,7 @@ class ImportTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->config = $this->getMockBuilder(IConfig::class) diff --git a/tests/Core/Command/Config/ListConfigsTest.php b/tests/Core/Command/Config/ListConfigsTest.php index 861c1f59d5..203feaacbf 100644 --- a/tests/Core/Command/Config/ListConfigsTest.php +++ b/tests/Core/Command/Config/ListConfigsTest.php @@ -44,7 +44,7 @@ class ListConfigsTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $systemConfig = $this->systemConfig = $this->getMockBuilder(SystemConfig::class) diff --git a/tests/Core/Command/Config/System/DeleteConfigTest.php b/tests/Core/Command/Config/System/DeleteConfigTest.php index 5ac4c853df..21ef3e3398 100644 --- a/tests/Core/Command/Config/System/DeleteConfigTest.php +++ b/tests/Core/Command/Config/System/DeleteConfigTest.php @@ -40,7 +40,7 @@ class DeleteConfigTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $systemConfig = $this->systemConfig = $this->getMockBuilder(SystemConfig::class) diff --git a/tests/Core/Command/Config/System/GetConfigTest.php b/tests/Core/Command/Config/System/GetConfigTest.php index fd5db69fec..1d8975f7f7 100644 --- a/tests/Core/Command/Config/System/GetConfigTest.php +++ b/tests/Core/Command/Config/System/GetConfigTest.php @@ -40,7 +40,7 @@ class GetConfigTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $systemConfig = $this->systemConfig = $this->getMockBuilder(SystemConfig::class) diff --git a/tests/Core/Command/Config/System/SetConfigTest.php b/tests/Core/Command/Config/System/SetConfigTest.php index bb8d2c4b96..e3cfa89093 100644 --- a/tests/Core/Command/Config/System/SetConfigTest.php +++ b/tests/Core/Command/Config/System/SetConfigTest.php @@ -40,7 +40,7 @@ class SetConfigTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $systemConfig = $this->systemConfig = $this->getMockBuilder(SystemConfig::class) diff --git a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php index 811b64029c..0f56cf53fa 100644 --- a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php +++ b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php @@ -63,7 +63,7 @@ class ChangeKeyStorageRootTest extends TestCase { /** @var \OCP\UserInterface | \PHPUnit_Framework_MockObject_MockObject */ protected $userInterface; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->view = $this->getMockBuilder(View::class)->getMock(); diff --git a/tests/Core/Command/Encryption/DecryptAllTest.php b/tests/Core/Command/Encryption/DecryptAllTest.php index 508d5da95f..7fa9535104 100644 --- a/tests/Core/Command/Encryption/DecryptAllTest.php +++ b/tests/Core/Command/Encryption/DecryptAllTest.php @@ -54,7 +54,7 @@ class DecryptAllTest extends TestCase { /** @var \PHPUnit_Framework_MockObject_MockObject | \OC\Encryption\DecryptAll */ protected $decryptAll; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class) diff --git a/tests/Core/Command/Encryption/DisableTest.php b/tests/Core/Command/Encryption/DisableTest.php index 77a690fe26..f9035a8478 100644 --- a/tests/Core/Command/Encryption/DisableTest.php +++ b/tests/Core/Command/Encryption/DisableTest.php @@ -39,7 +39,7 @@ class DisableTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->config = $this->getMockBuilder(IConfig::class) diff --git a/tests/Core/Command/Encryption/EnableTest.php b/tests/Core/Command/Encryption/EnableTest.php index eb1b784238..5c8fc826af 100644 --- a/tests/Core/Command/Encryption/EnableTest.php +++ b/tests/Core/Command/Encryption/EnableTest.php @@ -42,7 +42,7 @@ class EnableTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->config = $this->getMockBuilder(IConfig::class) diff --git a/tests/Core/Command/Encryption/EncryptAllTest.php b/tests/Core/Command/Encryption/EncryptAllTest.php index 7fa4b5e5bb..9c9818475f 100644 --- a/tests/Core/Command/Encryption/EncryptAllTest.php +++ b/tests/Core/Command/Encryption/EncryptAllTest.php @@ -58,7 +58,7 @@ class EncryptAllTest extends TestCase { /** @var EncryptAll */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class) diff --git a/tests/Core/Command/Encryption/SetDefaultModuleTest.php b/tests/Core/Command/Encryption/SetDefaultModuleTest.php index 2dc62d42bf..0776ef42b4 100644 --- a/tests/Core/Command/Encryption/SetDefaultModuleTest.php +++ b/tests/Core/Command/Encryption/SetDefaultModuleTest.php @@ -42,7 +42,7 @@ class SetDefaultModuleTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->manager = $this->getMockBuilder(IManager::class) diff --git a/tests/Core/Command/Group/AddTest.php b/tests/Core/Command/Group/AddTest.php index c7010e53e5..ea30a5d3d6 100644 --- a/tests/Core/Command/Group/AddTest.php +++ b/tests/Core/Command/Group/AddTest.php @@ -44,7 +44,7 @@ class AddTest extends TestCase { /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */ private $output; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->groupManager = $this->createMock(IGroupManager::class); diff --git a/tests/Core/Command/Group/AddUserTest.php b/tests/Core/Command/Group/AddUserTest.php index 7660aad119..85288d9e29 100644 --- a/tests/Core/Command/Group/AddUserTest.php +++ b/tests/Core/Command/Group/AddUserTest.php @@ -49,7 +49,7 @@ class AddUserTest extends TestCase { /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */ private $output; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->groupManager = $this->createMock(IGroupManager::class); diff --git a/tests/Core/Command/Group/DeleteTest.php b/tests/Core/Command/Group/DeleteTest.php index f9b1cbbe3a..4c2acbbad9 100644 --- a/tests/Core/Command/Group/DeleteTest.php +++ b/tests/Core/Command/Group/DeleteTest.php @@ -44,7 +44,7 @@ class DeleteTest extends TestCase { /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */ private $output; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->groupManager = $this->createMock(IGroupManager::class); diff --git a/tests/Core/Command/Group/ListCommandTest.php b/tests/Core/Command/Group/ListCommandTest.php index ab089c9342..71697d8940 100644 --- a/tests/Core/Command/Group/ListCommandTest.php +++ b/tests/Core/Command/Group/ListCommandTest.php @@ -45,7 +45,7 @@ class ListCommandTest extends TestCase { /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */ private $output; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->groupManager = $this->createMock(IGroupManager::class); diff --git a/tests/Core/Command/Group/RemoveUserTest.php b/tests/Core/Command/Group/RemoveUserTest.php index 8a75571e3c..7e835f5847 100644 --- a/tests/Core/Command/Group/RemoveUserTest.php +++ b/tests/Core/Command/Group/RemoveUserTest.php @@ -49,7 +49,7 @@ class RemoveUserTest extends TestCase { /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */ private $output; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->groupManager = $this->createMock(IGroupManager::class); diff --git a/tests/Core/Command/Log/FileTest.php b/tests/Core/Command/Log/FileTest.php index 4b8845277d..524a193d86 100644 --- a/tests/Core/Command/Log/FileTest.php +++ b/tests/Core/Command/Log/FileTest.php @@ -39,7 +39,7 @@ class FileTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->config = $this->getMockBuilder(IConfig::class) diff --git a/tests/Core/Command/Log/ManageTest.php b/tests/Core/Command/Log/ManageTest.php index 2044fc4de9..92907948fb 100644 --- a/tests/Core/Command/Log/ManageTest.php +++ b/tests/Core/Command/Log/ManageTest.php @@ -39,7 +39,7 @@ class ManageTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->config = $this->getMockBuilder(IConfig::class) diff --git a/tests/Core/Command/Maintenance/DataFingerprintTest.php b/tests/Core/Command/Maintenance/DataFingerprintTest.php index 90ffa50c01..5cc816627e 100644 --- a/tests/Core/Command/Maintenance/DataFingerprintTest.php +++ b/tests/Core/Command/Maintenance/DataFingerprintTest.php @@ -41,7 +41,7 @@ class DataFingerprintTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); diff --git a/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php b/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php index 7775700863..3260879686 100644 --- a/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php +++ b/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php @@ -44,7 +44,7 @@ class UpdateDBTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->detector = $this->getMockBuilder(Detection::class) diff --git a/tests/Core/Command/Maintenance/ModeTest.php b/tests/Core/Command/Maintenance/ModeTest.php index 895a06bbec..1e8af354d5 100644 --- a/tests/Core/Command/Maintenance/ModeTest.php +++ b/tests/Core/Command/Maintenance/ModeTest.php @@ -48,7 +48,7 @@ class ModeTest extends TestCase { * * @return void */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class) ->getMock(); diff --git a/tests/Core/Command/Maintenance/UpdateTheme.php b/tests/Core/Command/Maintenance/UpdateTheme.php index 73141cefcb..ace756b264 100644 --- a/tests/Core/Command/Maintenance/UpdateTheme.php +++ b/tests/Core/Command/Maintenance/UpdateTheme.php @@ -50,7 +50,7 @@ class UpdateThemeTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->detector = $this->createMock(Detection::class); diff --git a/tests/Core/Command/TwoFactorAuth/CleanupTest.php b/tests/Core/Command/TwoFactorAuth/CleanupTest.php index 227283decf..24aaa9abce 100644 --- a/tests/Core/Command/TwoFactorAuth/CleanupTest.php +++ b/tests/Core/Command/TwoFactorAuth/CleanupTest.php @@ -40,7 +40,7 @@ class CleanupTest extends TestCase { /** @var CommandTester */ private $cmd; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->registry = $this->createMock(IRegistry::class); diff --git a/tests/Core/Command/TwoFactorAuth/DisableTest.php b/tests/Core/Command/TwoFactorAuth/DisableTest.php index 30ebc007dc..9741f5b2b5 100644 --- a/tests/Core/Command/TwoFactorAuth/DisableTest.php +++ b/tests/Core/Command/TwoFactorAuth/DisableTest.php @@ -45,7 +45,7 @@ class DisableTest extends TestCase { /** @var CommandTester */ private $command; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->providerManager = $this->createMock(ProviderManager::class); diff --git a/tests/Core/Command/TwoFactorAuth/EnableTest.php b/tests/Core/Command/TwoFactorAuth/EnableTest.php index f31f92da4a..bd74bde2e8 100644 --- a/tests/Core/Command/TwoFactorAuth/EnableTest.php +++ b/tests/Core/Command/TwoFactorAuth/EnableTest.php @@ -45,7 +45,7 @@ class EnableTest extends TestCase { /** @var CommandTester */ private $command; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->providerManager = $this->createMock(ProviderManager::class); diff --git a/tests/Core/Command/TwoFactorAuth/EnforceTest.php b/tests/Core/Command/TwoFactorAuth/EnforceTest.php index 2d9b77e18c..aa2cbc1062 100644 --- a/tests/Core/Command/TwoFactorAuth/EnforceTest.php +++ b/tests/Core/Command/TwoFactorAuth/EnforceTest.php @@ -41,7 +41,7 @@ class EnforceTest extends TestCase { /** @var CommandTester */ private $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->mandatoryTwoFactor = $this->createMock(MandatoryTwoFactor::class); diff --git a/tests/Core/Command/TwoFactorAuth/StateTest.php b/tests/Core/Command/TwoFactorAuth/StateTest.php index 580e137fe3..8d1b28862d 100644 --- a/tests/Core/Command/TwoFactorAuth/StateTest.php +++ b/tests/Core/Command/TwoFactorAuth/StateTest.php @@ -45,7 +45,7 @@ class StateTest extends TestCase { /** @var CommandTester|MockObject */ private $cmd; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->registry = $this->createMock(IRegistry::class); diff --git a/tests/Core/Command/User/DeleteTest.php b/tests/Core/Command/User/DeleteTest.php index 1b94d37cfc..9dc920894d 100644 --- a/tests/Core/Command/User/DeleteTest.php +++ b/tests/Core/Command/User/DeleteTest.php @@ -40,7 +40,7 @@ class DeleteTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $userManager = $this->userManager = $this->getMockBuilder(IUserManager::class) diff --git a/tests/Core/Command/User/DisableTest.php b/tests/Core/Command/User/DisableTest.php index 019fedc1da..5456118f67 100644 --- a/tests/Core/Command/User/DisableTest.php +++ b/tests/Core/Command/User/DisableTest.php @@ -42,7 +42,7 @@ class DisableTest extends TestCase { /** @var Disable */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); diff --git a/tests/Core/Command/User/EnableTest.php b/tests/Core/Command/User/EnableTest.php index 9a3df13efe..4a723ca116 100644 --- a/tests/Core/Command/User/EnableTest.php +++ b/tests/Core/Command/User/EnableTest.php @@ -42,7 +42,7 @@ class EnableTest extends TestCase { /** @var Disable */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); diff --git a/tests/Core/Command/User/LastSeenTest.php b/tests/Core/Command/User/LastSeenTest.php index cceefb9881..f6ee479645 100644 --- a/tests/Core/Command/User/LastSeenTest.php +++ b/tests/Core/Command/User/LastSeenTest.php @@ -40,7 +40,7 @@ class LastSeenTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $userManager = $this->userManager = $this->getMockBuilder(IUserManager::class) diff --git a/tests/Core/Command/User/SettingTest.php b/tests/Core/Command/User/SettingTest.php index 784183c72c..7d71734334 100644 --- a/tests/Core/Command/User/SettingTest.php +++ b/tests/Core/Command/User/SettingTest.php @@ -42,7 +42,7 @@ class SettingTest extends TestCase { /** @var \Symfony\Component\Console\Output\OutputInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $consoleOutput; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->getMockBuilder(IUserManager::class) diff --git a/tests/Core/Controller/AppPasswordControllerTest.php b/tests/Core/Controller/AppPasswordControllerTest.php index a7be7a90b0..00a4dd2b5f 100644 --- a/tests/Core/Controller/AppPasswordControllerTest.php +++ b/tests/Core/Controller/AppPasswordControllerTest.php @@ -64,7 +64,7 @@ class AppPasswordControllerTest extends TestCase { /** @var AppPasswordController */ private $controller; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->session = $this->createMock(ISession::class); diff --git a/tests/Core/Controller/AutoCompleteControllerTest.php b/tests/Core/Controller/AutoCompleteControllerTest.php index 8ff0542cb0..ea62b50219 100644 --- a/tests/Core/Controller/AutoCompleteControllerTest.php +++ b/tests/Core/Controller/AutoCompleteControllerTest.php @@ -41,7 +41,7 @@ class AutoCompleteControllerTest extends TestCase { /** @var AutoCompleteController */ protected $controller; - protected function setUp() { + protected function setUp(): void { parent::setUp(); /** @var IRequest $request */ diff --git a/tests/Core/Controller/AvatarControllerTest.php b/tests/Core/Controller/AvatarControllerTest.php index 6f82607dc0..e43196824c 100644 --- a/tests/Core/Controller/AvatarControllerTest.php +++ b/tests/Core/Controller/AvatarControllerTest.php @@ -79,7 +79,7 @@ class AvatarControllerTest extends \Test\TestCase { /** @var TimeFactory|\PHPUnit_Framework_MockObject_MockObject */ private $timeFactory; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->avatarManager = $this->getMockBuilder('OCP\IAvatarManager')->getMock(); @@ -121,7 +121,7 @@ class AvatarControllerTest extends \Test\TestCase { $this->avatarFile->method('getEtag')->willReturn('my etag'); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); } diff --git a/tests/Core/Controller/CSRFTokenControllerTest.php b/tests/Core/Controller/CSRFTokenControllerTest.php index a97f2eabc2..74eebf6174 100644 --- a/tests/Core/Controller/CSRFTokenControllerTest.php +++ b/tests/Core/Controller/CSRFTokenControllerTest.php @@ -44,7 +44,7 @@ class CSRFTokenControllerTest extends TestCase { /** @var CsrfTokenManager|PHPUnit_Framework_MockObject_MockObject */ private $tokenManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/tests/Core/Controller/ChangePasswordControllerTest.php b/tests/Core/Controller/ChangePasswordControllerTest.php index 55f05c975e..ac9d9d3799 100644 --- a/tests/Core/Controller/ChangePasswordControllerTest.php +++ b/tests/Core/Controller/ChangePasswordControllerTest.php @@ -49,7 +49,7 @@ class ChangePasswordControllerTest extends \Test\TestCase { /** @var ChangePasswordController */ private $controller; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(\OC\User\Manager::class); diff --git a/tests/Core/Controller/ClientFlowLoginControllerTest.php b/tests/Core/Controller/ClientFlowLoginControllerTest.php index 1401eac67d..ebe43ba560 100644 --- a/tests/Core/Controller/ClientFlowLoginControllerTest.php +++ b/tests/Core/Controller/ClientFlowLoginControllerTest.php @@ -74,7 +74,7 @@ class ClientFlowLoginControllerTest extends TestCase { /** @var ClientFlowLoginController */ private $clientFlowLoginController; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php b/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php index c3ed740432..d8ce67b18f 100644 --- a/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php +++ b/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php @@ -58,7 +58,7 @@ class ClientFlowLoginV2ControllerTest extends TestCase { /** @var ClientFlowLoginV2Controller */ private $controller; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/tests/Core/Controller/ContactsMenuControllerTest.php b/tests/Core/Controller/ContactsMenuControllerTest.php index 92a185cf2a..24f1adb10f 100644 --- a/tests/Core/Controller/ContactsMenuControllerTest.php +++ b/tests/Core/Controller/ContactsMenuControllerTest.php @@ -47,7 +47,7 @@ class ContactsMenuControllerTest extends TestCase { /** @var ContactsMenuController */ private $controller; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/tests/Core/Controller/CssControllerTest.php b/tests/Core/Controller/CssControllerTest.php index faab89db40..edee29cee5 100644 --- a/tests/Core/Controller/CssControllerTest.php +++ b/tests/Core/Controller/CssControllerTest.php @@ -48,7 +48,7 @@ class CssControllerTest extends TestCase { /** @var CssController */ private $controller; - public function setUp() { + public function setUp(): void { parent::setUp(); /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */ diff --git a/tests/Core/Controller/GuestAvatarControllerTest.php b/tests/Core/Controller/GuestAvatarControllerTest.php index f720478e49..dd8188b002 100644 --- a/tests/Core/Controller/GuestAvatarControllerTest.php +++ b/tests/Core/Controller/GuestAvatarControllerTest.php @@ -48,7 +48,7 @@ class GuestAvatarControllerTest extends \Test\TestCase { /** * Sets up the test environment. */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->logger = $this->getMockBuilder(ILogger::class)->getMock(); diff --git a/tests/Core/Controller/JsControllerTest.php b/tests/Core/Controller/JsControllerTest.php index e05f5bf5de..503e97d1c5 100644 --- a/tests/Core/Controller/JsControllerTest.php +++ b/tests/Core/Controller/JsControllerTest.php @@ -48,7 +48,7 @@ class JsControllerTest extends TestCase { /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ private $request; - public function setUp() { + public function setUp(): void { parent::setUp(); /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */ diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php index df1b12b970..6a8db74b0d 100644 --- a/tests/Core/Controller/LoginControllerTest.php +++ b/tests/Core/Controller/LoginControllerTest.php @@ -83,7 +83,7 @@ class LoginControllerTest extends TestCase { /** @var IInitialStateService|MockObject */ private $initialStateService; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); $this->userManager = $this->createMock(\OC\User\Manager::class); diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php index 60b96a3908..27344102f0 100644 --- a/tests/Core/Controller/LostControllerTest.php +++ b/tests/Core/Controller/LostControllerTest.php @@ -84,7 +84,7 @@ class LostControllerTest extends \Test\TestCase { /** @var IInitialStateService|\PHPUnit_Framework_MockObject_MockObject */ private $initialStateService; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->existingUser = $this->createMock(IUser::class); diff --git a/tests/Core/Controller/NavigationControllerTest.php b/tests/Core/Controller/NavigationControllerTest.php index 71730a8f8b..ce77d1d068 100644 --- a/tests/Core/Controller/NavigationControllerTest.php +++ b/tests/Core/Controller/NavigationControllerTest.php @@ -45,7 +45,7 @@ class NavigationControllerTest extends TestCase { /** @var NavigationController */ private $controller; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/tests/Core/Controller/OCSControllerTest.php b/tests/Core/Controller/OCSControllerTest.php index 241c3b1247..d1e7f2c435 100644 --- a/tests/Core/Controller/OCSControllerTest.php +++ b/tests/Core/Controller/OCSControllerTest.php @@ -48,7 +48,7 @@ class OCSControllerTest extends TestCase { /** @var OCSController */ private $controller; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/tests/Core/Controller/PreviewControllerTest.php b/tests/Core/Controller/PreviewControllerTest.php index 7b66d32f61..145fb93f63 100644 --- a/tests/Core/Controller/PreviewControllerTest.php +++ b/tests/Core/Controller/PreviewControllerTest.php @@ -49,7 +49,7 @@ class PreviewControllerTest extends \Test\TestCase { /** @var PreviewController|\PHPUnit_Framework_MockObject_MockObject */ private $controller; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->rootFolder = $this->createMock(IRootFolder::class); diff --git a/tests/Core/Controller/TwoFactorChallengeControllerTest.php b/tests/Core/Controller/TwoFactorChallengeControllerTest.php index 73b035a408..40453db572 100644 --- a/tests/Core/Controller/TwoFactorChallengeControllerTest.php +++ b/tests/Core/Controller/TwoFactorChallengeControllerTest.php @@ -61,7 +61,7 @@ class TwoFactorChallengeControllerTest extends TestCase { /** @var TwoFactorChallengeController|PHPUnit_Framework_MockObject_MockObject */ private $controller; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/tests/Core/Controller/UserControllerTest.php b/tests/Core/Controller/UserControllerTest.php index 7a089d5e57..489433f10b 100644 --- a/tests/Core/Controller/UserControllerTest.php +++ b/tests/Core/Controller/UserControllerTest.php @@ -38,7 +38,7 @@ class UserControllerTest extends TestCase { /** @var UserController */ private $controller; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); diff --git a/tests/Core/Controller/WipeControllerTest.php b/tests/Core/Controller/WipeControllerTest.php index cc084890e7..ebbf650900 100644 --- a/tests/Core/Controller/WipeControllerTest.php +++ b/tests/Core/Controller/WipeControllerTest.php @@ -40,7 +40,7 @@ class WipeControllerTest extends TestCase { /** @var WipeController */ private $controller; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->remoteWipe = $this->createMock(RemoteWipe::class); diff --git a/tests/Core/Middleware/TwoFactorMiddlewareTest.php b/tests/Core/Middleware/TwoFactorMiddlewareTest.php index 994599212f..65db9733ab 100644 --- a/tests/Core/Middleware/TwoFactorMiddlewareTest.php +++ b/tests/Core/Middleware/TwoFactorMiddlewareTest.php @@ -70,7 +70,7 @@ class TwoFactorMiddlewareTest extends TestCase { /** @var Controller */ private $controller; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->twoFactorManager = $this->getMockBuilder(Manager::class) diff --git a/tests/acceptance/features/core/NextcloudTestServerLocalApacheHelper.php b/tests/acceptance/features/core/NextcloudTestServerLocalApacheHelper.php index b552a86d25..a2dd6664c6 100644 --- a/tests/acceptance/features/core/NextcloudTestServerLocalApacheHelper.php +++ b/tests/acceptance/features/core/NextcloudTestServerLocalApacheHelper.php @@ -72,7 +72,7 @@ class NextcloudTestServerLocalApacheHelper implements NextcloudTestServerHelper * @throws \Exception if the Nextcloud test server can not be reset or * started again. */ - public function setUp() { + public function setUp(): void { // Ensure that previous Apache server is not running (as cleanUp may not // have been called). $this->stopApacheServer(); diff --git a/tests/acceptance/features/core/NextcloudTestServerLocalBuiltInHelper.php b/tests/acceptance/features/core/NextcloudTestServerLocalBuiltInHelper.php index 722f580171..1e74f5c66d 100644 --- a/tests/acceptance/features/core/NextcloudTestServerLocalBuiltInHelper.php +++ b/tests/acceptance/features/core/NextcloudTestServerLocalBuiltInHelper.php @@ -76,7 +76,7 @@ class NextcloudTestServerLocalBuiltInHelper implements NextcloudTestServerHelper * @throws \Exception if the Nextcloud test server can not be reset or * started again. */ - public function setUp() { + public function setUp(): void { // Ensure that previous PHP server is not running (as cleanUp may not // have been called). $this->killPhpServer(); diff --git a/tests/lib/Accounts/AccountsManagerTest.php b/tests/lib/Accounts/AccountsManagerTest.php index 9d9a0e0158..3204eca8bb 100644 --- a/tests/lib/Accounts/AccountsManagerTest.php +++ b/tests/lib/Accounts/AccountsManagerTest.php @@ -51,7 +51,7 @@ class AccountsManagerTest extends TestCase { /** @var string accounts table name */ private $table = 'accounts'; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->eventDispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface') ->disableOriginalConstructor()->getMock(); @@ -59,7 +59,7 @@ class AccountsManagerTest extends TestCase { $this->jobList = $this->getMockBuilder(IJobList::class)->getMock(); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); $query = $this->connection->getQueryBuilder(); $query->delete($this->table)->execute(); diff --git a/tests/lib/Accounts/HooksTest.php b/tests/lib/Accounts/HooksTest.php index 0534f2dba6..1cffb1e265 100644 --- a/tests/lib/Accounts/HooksTest.php +++ b/tests/lib/Accounts/HooksTest.php @@ -45,7 +45,7 @@ class HooksTest extends TestCase { /** @var Hooks | \PHPUnit_Framework_MockObject_MockObject */ private $hooks; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->logger = $this->createMock(ILogger::class); diff --git a/tests/lib/Activity/ManagerTest.php b/tests/lib/Activity/ManagerTest.php index ba6b87ca9a..fed4bceb6a 100644 --- a/tests/lib/Activity/ManagerTest.php +++ b/tests/lib/Activity/ManagerTest.php @@ -44,7 +44,7 @@ class ManagerTest extends TestCase { /** @var IValidator|\PHPUnit_Framework_MockObject_MockObject */ protected $validator; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/tests/lib/App/AppManagerTest.php b/tests/lib/App/AppManagerTest.php index 66b210c4c1..0dc93174a6 100644 --- a/tests/lib/App/AppManagerTest.php +++ b/tests/lib/App/AppManagerTest.php @@ -97,7 +97,7 @@ class AppManagerTest extends TestCase { /** @var IAppManager */ protected $manager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userSession = $this->createMock(IUserSession::class); diff --git a/tests/lib/App/AppStore/Bundles/BundleBase.php b/tests/lib/App/AppStore/Bundles/BundleBase.php index 23af1cda92..6b03940c9a 100644 --- a/tests/lib/App/AppStore/Bundles/BundleBase.php +++ b/tests/lib/App/AppStore/Bundles/BundleBase.php @@ -37,7 +37,7 @@ abstract class BundleBase extends TestCase { /** @var array */ protected $bundleAppIds; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->l10n = $this->createMock(IL10N::class); $this->l10n->method('t') diff --git a/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php b/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php index 350f6654e0..27384953d3 100644 --- a/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php +++ b/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php @@ -36,7 +36,7 @@ class BundleFetcherTest extends TestCase { /** @var BundleFetcher */ private $bundleFetcher; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->l10n = $this->createMock(IL10N::class); diff --git a/tests/lib/App/AppStore/Bundles/CoreBundleTest.php b/tests/lib/App/AppStore/Bundles/CoreBundleTest.php index 235e2ec84f..01a449c809 100644 --- a/tests/lib/App/AppStore/Bundles/CoreBundleTest.php +++ b/tests/lib/App/AppStore/Bundles/CoreBundleTest.php @@ -24,7 +24,7 @@ namespace Test\App\AppStore\Bundles; use OC\App\AppStore\Bundles\CoreBundle; class CoreBundleTest extends BundleBase { - public function setUp() { + public function setUp(): void { parent::setUp(); $this->bundle = new CoreBundle($this->l10n); $this->bundleIdentifier = 'CoreBundle'; diff --git a/tests/lib/App/AppStore/Bundles/EducationBundleTest.php b/tests/lib/App/AppStore/Bundles/EducationBundleTest.php index 589f35db21..e3da7f1f66 100644 --- a/tests/lib/App/AppStore/Bundles/EducationBundleTest.php +++ b/tests/lib/App/AppStore/Bundles/EducationBundleTest.php @@ -24,7 +24,7 @@ namespace Test\App\AppStore\Bundles; use OC\App\AppStore\Bundles\EducationBundle; class EducationBundleTest extends BundleBase { - public function setUp() { + public function setUp(): void { parent::setUp(); $this->bundle = new EducationBundle($this->l10n); $this->bundleIdentifier = 'EducationBundle'; diff --git a/tests/lib/App/AppStore/Bundles/EnterpriseBundleTest.php b/tests/lib/App/AppStore/Bundles/EnterpriseBundleTest.php index b3182ff00c..717c6151ed 100644 --- a/tests/lib/App/AppStore/Bundles/EnterpriseBundleTest.php +++ b/tests/lib/App/AppStore/Bundles/EnterpriseBundleTest.php @@ -24,7 +24,7 @@ namespace Test\App\AppStore\Bundles; use OC\App\AppStore\Bundles\EnterpriseBundle; class EnterpriseBundleTest extends BundleBase { - public function setUp() { + public function setUp(): void { parent::setUp(); $this->bundle = new EnterpriseBundle($this->l10n); $this->bundleIdentifier = 'EnterpriseBundle'; diff --git a/tests/lib/App/AppStore/Bundles/GroupwareBundleTest.php b/tests/lib/App/AppStore/Bundles/GroupwareBundleTest.php index ccff5dcbd3..547e6e84ec 100644 --- a/tests/lib/App/AppStore/Bundles/GroupwareBundleTest.php +++ b/tests/lib/App/AppStore/Bundles/GroupwareBundleTest.php @@ -24,7 +24,7 @@ namespace Test\App\AppStore\Bundles; use OC\App\AppStore\Bundles\GroupwareBundle; class GroupwareBundleTest extends BundleBase { - public function setUp() { + public function setUp(): void { parent::setUp(); $this->bundle = new GroupwareBundle($this->l10n); $this->bundleIdentifier = 'GroupwareBundle'; diff --git a/tests/lib/App/AppStore/Bundles/SocialSharingBundleTest.php b/tests/lib/App/AppStore/Bundles/SocialSharingBundleTest.php index 3d8bccf193..7f0e0f4930 100644 --- a/tests/lib/App/AppStore/Bundles/SocialSharingBundleTest.php +++ b/tests/lib/App/AppStore/Bundles/SocialSharingBundleTest.php @@ -24,7 +24,7 @@ namespace Test\App\AppStore\Bundles; use OC\App\AppStore\Bundles\SocialSharingBundle; class SocialSharingBundleTest extends BundleBase { - public function setUp() { + public function setUp(): void { parent::setUp(); $this->bundle = new SocialSharingBundle($this->l10n); $this->bundleIdentifier = 'SocialSharingBundle'; diff --git a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php index 214f652742..cf19b5aa35 100644 --- a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php +++ b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php @@ -59,7 +59,7 @@ class AppFetcherTest extends TestCase { EOD; - public function setUp() { + public function setUp(): void { parent::setUp(); /** @var Factory|PHPUnit_Framework_MockObject_MockObject $factory */ diff --git a/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php b/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php index f4b8c320c5..753a1bf88d 100644 --- a/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php +++ b/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php @@ -24,7 +24,7 @@ namespace Test\App\AppStore\Fetcher; use OC\App\AppStore\Fetcher\CategoryFetcher; class CategoryFetcherTest extends FetcherBase { - public function setUp() { + public function setUp(): void { parent::setUp(); $this->fileName = 'categories.json'; $this->endpoint = 'https://apps.nextcloud.com/api/v1/categories.json'; diff --git a/tests/lib/App/AppStore/Fetcher/FetcherBase.php b/tests/lib/App/AppStore/Fetcher/FetcherBase.php index 851773a650..4f614d3310 100644 --- a/tests/lib/App/AppStore/Fetcher/FetcherBase.php +++ b/tests/lib/App/AppStore/Fetcher/FetcherBase.php @@ -56,7 +56,7 @@ abstract class FetcherBase extends TestCase { /** @var string */ protected $endpoint; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->appDataFactory = $this->createMock(Factory::class); $this->appData = $this->createMock(AppData::class); diff --git a/tests/lib/App/AppStore/Version/VersionParserTest.php b/tests/lib/App/AppStore/Version/VersionParserTest.php index ebfa98ade3..ea30f40d82 100644 --- a/tests/lib/App/AppStore/Version/VersionParserTest.php +++ b/tests/lib/App/AppStore/Version/VersionParserTest.php @@ -29,7 +29,7 @@ class VersionParserTest extends TestCase { /** @var VersionParser */ private $versionParser; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->versionParser = new VersionParser(); } diff --git a/tests/lib/App/CodeChecker/InfoCheckerTest.php b/tests/lib/App/CodeChecker/InfoCheckerTest.php index 3128f902f4..531066a54c 100644 --- a/tests/lib/App/CodeChecker/InfoCheckerTest.php +++ b/tests/lib/App/CodeChecker/InfoCheckerTest.php @@ -29,7 +29,7 @@ class InfoCheckerTest extends TestCase { /** @var InfoChecker */ protected $infoChecker; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { \OC::$APPSROOTS[] = [ 'path' => \OC::$SERVERROOT . '/tests/apps', 'url' => '/apps-test', @@ -37,12 +37,12 @@ class InfoCheckerTest extends TestCase { ]; } - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { // remove last element array_pop(\OC::$APPSROOTS); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->infoChecker = new InfoChecker(); } diff --git a/tests/lib/App/CompareVersionTest.php b/tests/lib/App/CompareVersionTest.php index 60309fdeae..af04691f27 100644 --- a/tests/lib/App/CompareVersionTest.php +++ b/tests/lib/App/CompareVersionTest.php @@ -33,7 +33,7 @@ class CompareVersionTest extends TestCase { /** @var CompareVersion */ private $compare; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->compare = new CompareVersion(); diff --git a/tests/lib/App/DependencyAnalyzerTest.php b/tests/lib/App/DependencyAnalyzerTest.php index 081f6d767d..d6848971a8 100644 --- a/tests/lib/App/DependencyAnalyzerTest.php +++ b/tests/lib/App/DependencyAnalyzerTest.php @@ -26,7 +26,7 @@ class DependencyAnalyzerTest extends TestCase { /** @var DependencyAnalyzer */ private $analyser; - public function setUp() { + public function setUp(): void { $this->platformMock = $this->getMockBuilder(Platform::class) ->disableOriginalConstructor() ->getMock(); diff --git a/tests/lib/App/InfoParserTest.php b/tests/lib/App/InfoParserTest.php index b72a869e02..8de0f4cfd4 100644 --- a/tests/lib/App/InfoParserTest.php +++ b/tests/lib/App/InfoParserTest.php @@ -16,7 +16,7 @@ class InfoParserTest extends TestCase { /** @var OC\Cache\CappedMemoryCache */ private static $cache; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { self::$cache = new OC\Cache\CappedMemoryCache(); } diff --git a/tests/lib/AppConfigTest.php b/tests/lib/AppConfigTest.php index 9456fe4c23..87f8142d4b 100644 --- a/tests/lib/AppConfigTest.php +++ b/tests/lib/AppConfigTest.php @@ -26,7 +26,7 @@ class AppConfigTest extends TestCase { protected $originalConfig; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -111,7 +111,7 @@ class AppConfigTest extends TestCase { ])->execute(); } - public function tearDown() { + public function tearDown(): void { $sql = $this->connection->getQueryBuilder(); $sql->delete('appconfig'); $sql->execute(); diff --git a/tests/lib/AppFramework/AppTest.php b/tests/lib/AppFramework/AppTest.php index cd3e7c47ad..ccc694942a 100644 --- a/tests/lib/AppFramework/AppTest.php +++ b/tests/lib/AppFramework/AppTest.php @@ -56,7 +56,7 @@ class AppTest extends \Test\TestCase { private $controllerMethod; private $appPath; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->container = new \OC\AppFramework\DependencyInjection\DIContainer('test', array()); @@ -121,7 +121,7 @@ class AppTest extends \Test\TestCase { } - protected function tearDown() { + protected function tearDown(): void { rrmdir($this->appPath); parent::tearDown(); } diff --git a/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php b/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php index 30da40d36b..8eb76d3cb2 100644 --- a/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php +++ b/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php @@ -50,7 +50,7 @@ class AuthPublicShareControllerTest extends \Test\TestCase { private $controller; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/tests/lib/AppFramework/Controller/ControllerTest.php b/tests/lib/AppFramework/Controller/ControllerTest.php index 7831b44b63..d239cacf63 100644 --- a/tests/lib/AppFramework/Controller/ControllerTest.php +++ b/tests/lib/AppFramework/Controller/ControllerTest.php @@ -62,7 +62,7 @@ class ControllerTest extends \Test\TestCase { private $controller; private $app; - protected function setUp(){ + protected function setUp(): void { parent::setUp(); $request = new Request( diff --git a/tests/lib/AppFramework/Controller/PublicShareControllerTest.php b/tests/lib/AppFramework/Controller/PublicShareControllerTest.php index f20f996d5a..318647ca84 100644 --- a/tests/lib/AppFramework/Controller/PublicShareControllerTest.php +++ b/tests/lib/AppFramework/Controller/PublicShareControllerTest.php @@ -47,7 +47,7 @@ class PublicShareControllerTest extends \Test\TestCase { private $controller; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/tests/lib/AppFramework/Db/EntityTest.php b/tests/lib/AppFramework/Db/EntityTest.php index a49440949e..3eb9f6eef5 100644 --- a/tests/lib/AppFramework/Db/EntityTest.php +++ b/tests/lib/AppFramework/Db/EntityTest.php @@ -66,7 +66,7 @@ class EntityTest extends \Test\TestCase { private $entity; - protected function setUp(){ + protected function setUp(): void { parent::setUp(); $this->entity = new TestEntity(); } diff --git a/tests/lib/AppFramework/Db/MapperTest.php b/tests/lib/AppFramework/Db/MapperTest.php index 8ca80fe11c..a69980fbb2 100644 --- a/tests/lib/AppFramework/Db/MapperTest.php +++ b/tests/lib/AppFramework/Db/MapperTest.php @@ -60,7 +60,7 @@ class MapperTest extends MapperTestUtility { */ private $mapper; - protected function setUp(){ + protected function setUp(): void { parent::setUp(); $this->mapper = new ExampleMapper($this->db); } diff --git a/tests/lib/AppFramework/Db/MapperTestUtility.php b/tests/lib/AppFramework/Db/MapperTestUtility.php index 71c21a0663..83156a3932 100644 --- a/tests/lib/AppFramework/Db/MapperTestUtility.php +++ b/tests/lib/AppFramework/Db/MapperTestUtility.php @@ -40,7 +40,7 @@ abstract class MapperTestUtility extends \Test\TestCase { * Run this function before the actual test to either set or initialize the * db. After this the db can be accessed by using $this->db */ - protected function setUp(){ + protected function setUp(): void { parent::setUp(); $this->db = $this->getMockBuilder( diff --git a/tests/lib/AppFramework/Db/QBMapperTest.php b/tests/lib/AppFramework/Db/QBMapperTest.php index 279c95afae..da4102396d 100644 --- a/tests/lib/AppFramework/Db/QBMapperTest.php +++ b/tests/lib/AppFramework/Db/QBMapperTest.php @@ -105,7 +105,7 @@ class QBMapperTest extends \Test\TestCase { /** * @throws \ReflectionException */ - protected function setUp() { + protected function setUp(): void { $this->db = $this->getMockBuilder(IDBConnection::class) ->disableOriginalConstructor() diff --git a/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php b/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php index 03c8265f2c..95d368a448 100644 --- a/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php +++ b/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php @@ -41,7 +41,7 @@ class DIContainerTest extends \Test\TestCase { /** @var DIContainer|\PHPUnit_Framework_MockObject_MockObject */ private $container; - protected function setUp(){ + protected function setUp(): void { parent::setUp(); $this->container = $this->getMockBuilder(DIContainer::class) ->setMethods(['isAdminUser']) diff --git a/tests/lib/AppFramework/DependencyInjection/DIIntergrationTests.php b/tests/lib/AppFramework/DependencyInjection/DIIntergrationTests.php index d3d3f73e87..a0783474df 100644 --- a/tests/lib/AppFramework/DependencyInjection/DIIntergrationTests.php +++ b/tests/lib/AppFramework/DependencyInjection/DIIntergrationTests.php @@ -56,7 +56,7 @@ class DIIntergrationTests extends TestCase { /** @var ServerContainer */ private $server; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = new ServerContainer(); diff --git a/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php b/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php index b6163e9038..1f687b1f7c 100644 --- a/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php +++ b/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php @@ -21,7 +21,7 @@ class ContentSecurityPolicyTest extends \Test\TestCase { /** @var ContentSecurityPolicy */ private $contentSecurityPolicy; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->contentSecurityPolicy = new ContentSecurityPolicy(); } diff --git a/tests/lib/AppFramework/Http/DataResponseTest.php b/tests/lib/AppFramework/Http/DataResponseTest.php index 6f81e0d56b..b629c6d385 100644 --- a/tests/lib/AppFramework/Http/DataResponseTest.php +++ b/tests/lib/AppFramework/Http/DataResponseTest.php @@ -34,7 +34,7 @@ class DataResponseTest extends \Test\TestCase { */ private $response; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->response = new DataResponse(); } diff --git a/tests/lib/AppFramework/Http/DispatcherTest.php b/tests/lib/AppFramework/Http/DispatcherTest.php index 404c94abdb..1c4dc067b5 100644 --- a/tests/lib/AppFramework/Http/DispatcherTest.php +++ b/tests/lib/AppFramework/Http/DispatcherTest.php @@ -87,7 +87,7 @@ class DispatcherTest extends \Test\TestCase { private $http; private $reflector; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->controllerMethod = 'test'; diff --git a/tests/lib/AppFramework/Http/DownloadResponseTest.php b/tests/lib/AppFramework/Http/DownloadResponseTest.php index 97c7ab75ed..5f816eaeb7 100644 --- a/tests/lib/AppFramework/Http/DownloadResponseTest.php +++ b/tests/lib/AppFramework/Http/DownloadResponseTest.php @@ -38,7 +38,7 @@ class DownloadResponseTest extends \Test\TestCase { */ protected $response; - protected function setUp(){ + protected function setUp(): void { parent::setUp(); $this->response = new ChildDownloadResponse('file', 'content'); } diff --git a/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php b/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php index d9bdfccf60..86de705a80 100644 --- a/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php +++ b/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php @@ -21,7 +21,7 @@ class EmptyContentSecurityPolicyTest extends \Test\TestCase { /** @var EmptyContentSecurityPolicy */ private $contentSecurityPolicy; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->contentSecurityPolicy = new EmptyContentSecurityPolicy(); } diff --git a/tests/lib/AppFramework/Http/EmptyFeaturePolicyTest.php b/tests/lib/AppFramework/Http/EmptyFeaturePolicyTest.php index 9150503c63..0321d700cd 100644 --- a/tests/lib/AppFramework/Http/EmptyFeaturePolicyTest.php +++ b/tests/lib/AppFramework/Http/EmptyFeaturePolicyTest.php @@ -31,7 +31,7 @@ class EmptyFeaturePolicyTest extends \Test\TestCase { /** @var EmptyFeaturePolicy */ private $policy; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->policy = new EmptyFeaturePolicy(); } diff --git a/tests/lib/AppFramework/Http/FeaturePolicyTest.php b/tests/lib/AppFramework/Http/FeaturePolicyTest.php index 7c2cc3fa6d..45d7ff0c55 100644 --- a/tests/lib/AppFramework/Http/FeaturePolicyTest.php +++ b/tests/lib/AppFramework/Http/FeaturePolicyTest.php @@ -31,7 +31,7 @@ class FeaturePolicyTest extends \Test\TestCase { /** @var EmptyFeaturePolicy */ private $policy; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->policy = new FeaturePolicy(); } diff --git a/tests/lib/AppFramework/Http/FileDisplayResponseTest.php b/tests/lib/AppFramework/Http/FileDisplayResponseTest.php index 2c91289a5c..d7c8b384bf 100644 --- a/tests/lib/AppFramework/Http/FileDisplayResponseTest.php +++ b/tests/lib/AppFramework/Http/FileDisplayResponseTest.php @@ -34,7 +34,7 @@ class FileDisplayResponseTest extends \Test\TestCase { /** @var FileDisplayResponse */ private $response; - public function setup() { + public function setUp(): void { $this->file = $this->getMockBuilder('OCP\Files\File') ->getMock(); diff --git a/tests/lib/AppFramework/Http/HttpTest.php b/tests/lib/AppFramework/Http/HttpTest.php index 0a13e1e11e..79c03ce1ab 100644 --- a/tests/lib/AppFramework/Http/HttpTest.php +++ b/tests/lib/AppFramework/Http/HttpTest.php @@ -34,7 +34,7 @@ class HttpTest extends \Test\TestCase { */ private $http; - protected function setUp(){ + protected function setUp(): void { parent::setUp(); $this->server = array(); diff --git a/tests/lib/AppFramework/Http/JSONResponseTest.php b/tests/lib/AppFramework/Http/JSONResponseTest.php index a74bd67d1f..4981313c32 100644 --- a/tests/lib/AppFramework/Http/JSONResponseTest.php +++ b/tests/lib/AppFramework/Http/JSONResponseTest.php @@ -36,7 +36,7 @@ class JSONResponseTest extends \Test\TestCase { */ private $json; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->json = new JSONResponse(); } diff --git a/tests/lib/AppFramework/Http/RedirectResponseTest.php b/tests/lib/AppFramework/Http/RedirectResponseTest.php index 218f748a88..fc24f323c6 100644 --- a/tests/lib/AppFramework/Http/RedirectResponseTest.php +++ b/tests/lib/AppFramework/Http/RedirectResponseTest.php @@ -33,7 +33,7 @@ class RedirectResponseTest extends \Test\TestCase { */ protected $response; - protected function setUp(){ + protected function setUp(): void { parent::setUp(); $this->response = new RedirectResponse('/url'); } diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php index 2ad660405f..7ca09cf33d 100644 --- a/tests/lib/AppFramework/Http/RequestTest.php +++ b/tests/lib/AppFramework/Http/RequestTest.php @@ -31,7 +31,7 @@ class RequestTest extends \Test\TestCase { /** @var CsrfTokenManager */ protected $csrfTokenManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); if (in_array('fakeinput', stream_get_wrappers())) { @@ -45,7 +45,7 @@ class RequestTest extends \Test\TestCase { ->disableOriginalConstructor()->getMock(); } - protected function tearDown() { + protected function tearDown(): void { stream_wrapper_unregister('fakeinput'); parent::tearDown(); } diff --git a/tests/lib/AppFramework/Http/ResponseTest.php b/tests/lib/AppFramework/Http/ResponseTest.php index 64b9566f8e..3d76d24496 100644 --- a/tests/lib/AppFramework/Http/ResponseTest.php +++ b/tests/lib/AppFramework/Http/ResponseTest.php @@ -35,7 +35,7 @@ class ResponseTest extends \Test\TestCase { */ private $childResponse; - protected function setUp(){ + protected function setUp(): void { parent::setUp(); $this->childResponse = new Response(); } diff --git a/tests/lib/AppFramework/Http/StreamResponseTest.php b/tests/lib/AppFramework/Http/StreamResponseTest.php index ef9a37aa81..ef7132013b 100644 --- a/tests/lib/AppFramework/Http/StreamResponseTest.php +++ b/tests/lib/AppFramework/Http/StreamResponseTest.php @@ -33,7 +33,7 @@ class StreamResponseTest extends \Test\TestCase { /** @var IOutput */ private $output; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->output = $this->getMockBuilder('OCP\\AppFramework\\Http\\IOutput') ->disableOriginalConstructor() diff --git a/tests/lib/AppFramework/Http/TemplateResponseTest.php b/tests/lib/AppFramework/Http/TemplateResponseTest.php index b558622225..6672b4d0c1 100644 --- a/tests/lib/AppFramework/Http/TemplateResponseTest.php +++ b/tests/lib/AppFramework/Http/TemplateResponseTest.php @@ -33,7 +33,7 @@ class TemplateResponseTest extends \Test\TestCase { */ private $tpl; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tpl = new TemplateResponse('app', 'home'); diff --git a/tests/lib/AppFramework/Middleware/AdditionalScriptsMiddlewareTest.php b/tests/lib/AppFramework/Middleware/AdditionalScriptsMiddlewareTest.php index 7f817e03c1..3174971032 100644 --- a/tests/lib/AppFramework/Middleware/AdditionalScriptsMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/AdditionalScriptsMiddlewareTest.php @@ -47,7 +47,7 @@ class AdditionalScriptsMiddlewareTest extends \Test\TestCase { /** @var AdditionalScriptsMiddleware */ private $middleWare; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->dispatcher = $this->createMock(EventDispatcherInterface::class); diff --git a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php index e38aa4525e..965637cb4c 100644 --- a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php +++ b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php @@ -113,7 +113,7 @@ class MiddlewareDispatcherTest extends \Test\TestCase { */ private $dispatcher; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->dispatcher = new MiddlewareDispatcher(); diff --git a/tests/lib/AppFramework/Middleware/MiddlewareTest.php b/tests/lib/AppFramework/Middleware/MiddlewareTest.php index 8f9c60b65f..4ac6fa647f 100644 --- a/tests/lib/AppFramework/Middleware/MiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/MiddlewareTest.php @@ -43,7 +43,7 @@ class MiddlewareTest extends \Test\TestCase { /** @var Response */ private $response; - protected function setUp(){ + protected function setUp(): void { parent::setUp(); $this->middleware = new ChildMiddleware(); diff --git a/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php b/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php index cca3b4aecc..e001e48acd 100644 --- a/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php @@ -42,7 +42,7 @@ class OCSMiddlewareTest extends \Test\TestCase { */ private $request; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder(IRequest::class) diff --git a/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php b/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php index 4ad90b6e87..82f354d127 100644 --- a/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php @@ -49,7 +49,7 @@ class PublicShareMiddlewareTest extends \Test\TestCase { private $middleware; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php index ae2345764f..6d464a6617 100644 --- a/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php @@ -40,7 +40,7 @@ class BruteForceMiddlewareTest extends TestCase { /** @var BruteForceMiddleware */ private $bruteForceMiddleware; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->reflector = $this->createMock(ControllerMethodReflector::class); diff --git a/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php index 0fab880307..e022770a8c 100644 --- a/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php @@ -34,7 +34,7 @@ class CORSMiddlewareTest extends \Test\TestCase { /** @var Controller */ private $controller; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->reflector = new ControllerMethodReflector(); $this->session = $this->createMock(Session::class); diff --git a/tests/lib/AppFramework/Middleware/Security/CSPMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/CSPMiddlewareTest.php index 9f2b4e399f..6d089e3880 100644 --- a/tests/lib/AppFramework/Middleware/Security/CSPMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/CSPMiddlewareTest.php @@ -48,7 +48,7 @@ class CSPMiddlewareTest extends \Test\TestCase { /** @var ContentSecurityPolicyNonceManager|MockObject */ private $cspNonceManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->controller = $this->createMock(Controller::class); diff --git a/tests/lib/AppFramework/Middleware/Security/FeaturePolicyMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/FeaturePolicyMiddlewareTest.php index d2ab8d0591..e136d78361 100644 --- a/tests/lib/AppFramework/Middleware/Security/FeaturePolicyMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/FeaturePolicyMiddlewareTest.php @@ -44,7 +44,7 @@ class FeaturePolicyMiddlewareTest extends \Test\TestCase { /** @var FeaturePolicyManager|MockObject */ private $manager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->controller = $this->createMock(Controller::class); diff --git a/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php index c981e840d7..7a64b6cbca 100644 --- a/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php @@ -49,7 +49,7 @@ class PasswordConfirmationMiddlewareTest extends TestCase { /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ private $timeFactory; - protected function setUp() { + protected function setUp(): void { $this->reflector = new ControllerMethodReflector(); $this->session = $this->createMock(ISession::class); $this->userSession = $this->createMock(IUserSession::class); diff --git a/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php index 1317a07447..89e396fcee 100644 --- a/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php @@ -45,7 +45,7 @@ class RateLimitingMiddlewareTest extends TestCase { /** @var RateLimitingMiddleware */ private $rateLimitingMiddleware; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php index c92c131780..c30d276088 100644 --- a/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php @@ -43,7 +43,7 @@ class SameSiteCookieMiddlewareTest extends TestCase { /** @var ControllerMethodReflector|\PHPUnit_Framework_MockObject_MockObject */ private $reflector; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(Request::class); diff --git a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php index 00bb1a0bb3..26d09af900 100644 --- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php @@ -77,7 +77,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ private $l10n; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->controller = $this->createMock(Controller::class); diff --git a/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php b/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php index 2cd61c73c7..db2a9d5b62 100644 --- a/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php @@ -26,7 +26,7 @@ class SessionMiddlewareTest extends \Test\TestCase { /** @var Controller */ private $controller; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->reflector = new ControllerMethodReflector(); diff --git a/tests/lib/AppFramework/Utility/SimpleContainerTest.php b/tests/lib/AppFramework/Utility/SimpleContainerTest.php index b2f6c6ad8d..cfd55d8d6d 100644 --- a/tests/lib/AppFramework/Utility/SimpleContainerTest.php +++ b/tests/lib/AppFramework/Utility/SimpleContainerTest.php @@ -61,7 +61,7 @@ class SimpleContainerTest extends \Test\TestCase { private $container; - public function setUp() { + public function setUp(): void { $this->container = new SimpleContainer(); } diff --git a/tests/lib/Authentication/Listeners/RemoteWipeActivityListenerTest.php b/tests/lib/Authentication/Listeners/RemoteWipeActivityListenerTest.php index 87a7b03027..47d1d53a74 100644 --- a/tests/lib/Authentication/Listeners/RemoteWipeActivityListenerTest.php +++ b/tests/lib/Authentication/Listeners/RemoteWipeActivityListenerTest.php @@ -47,7 +47,7 @@ class RemoteWipeActivityListenerTests extends TestCase { /** @var IEventListener */ private $listener; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->activityManager = $this->createMock(IActivityManager::class); diff --git a/tests/lib/Authentication/Listeners/RemoteWipeEmailListenerTest.php b/tests/lib/Authentication/Listeners/RemoteWipeEmailListenerTest.php index ea7740057b..3d47b8d4a0 100644 --- a/tests/lib/Authentication/Listeners/RemoteWipeEmailListenerTest.php +++ b/tests/lib/Authentication/Listeners/RemoteWipeEmailListenerTest.php @@ -60,7 +60,7 @@ class RemoteWipeEmailListenerTest extends TestCase { /** @var IEventListener */ private $listener; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->mailer = $this->createMock(IMailer::class); diff --git a/tests/lib/Authentication/Listeners/RemoteWipeNotificationsListenerTest.php b/tests/lib/Authentication/Listeners/RemoteWipeNotificationsListenerTest.php index e3e526e401..79d362410a 100644 --- a/tests/lib/Authentication/Listeners/RemoteWipeNotificationsListenerTest.php +++ b/tests/lib/Authentication/Listeners/RemoteWipeNotificationsListenerTest.php @@ -47,7 +47,7 @@ class RemoteWipeNotificationListenerTests extends TestCase { /** @var IEventListener */ private $listener; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->notificationManager = $this->createMock(INotificationManager::class); diff --git a/tests/lib/Authentication/Login/ALoginCommandTest.php b/tests/lib/Authentication/Login/ALoginCommandTest.php index ec3b324b2c..f09b649ffc 100644 --- a/tests/lib/Authentication/Login/ALoginCommandTest.php +++ b/tests/lib/Authentication/Login/ALoginCommandTest.php @@ -56,7 +56,7 @@ abstract class ALoginCommandTest extends TestCase { /** @var ALoginCommand */ protected $cmd; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/tests/lib/Authentication/Login/ClearLostPasswordTokensCommandTest.php b/tests/lib/Authentication/Login/ClearLostPasswordTokensCommandTest.php index 05078cde93..0d3b7acfa2 100644 --- a/tests/lib/Authentication/Login/ClearLostPasswordTokensCommandTest.php +++ b/tests/lib/Authentication/Login/ClearLostPasswordTokensCommandTest.php @@ -36,7 +36,7 @@ class ClearLostPasswordTokensCommandTest extends ALoginCommandTest { /** @var IConfig|MockObject */ private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Authentication/Login/CompleteLoginCommandTest.php b/tests/lib/Authentication/Login/CompleteLoginCommandTest.php index bf312e7f4e..e611611dd7 100644 --- a/tests/lib/Authentication/Login/CompleteLoginCommandTest.php +++ b/tests/lib/Authentication/Login/CompleteLoginCommandTest.php @@ -34,7 +34,7 @@ class CompleteLoginCommandTest extends ALoginCommandTest { /** @var Session|MockObject */ private $session; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->session = $this->createMock(Session::class); diff --git a/tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php b/tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php index 11d2ea36b2..82ae90015a 100644 --- a/tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php +++ b/tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php @@ -39,7 +39,7 @@ class CreateSessionTokenCommandTest extends ALoginCommandTest { /** @var Session|MockObject */ private $userSession; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Authentication/Login/EmailLoginCommandTest.php b/tests/lib/Authentication/Login/EmailLoginCommandTest.php index c72048d887..5217a4d008 100644 --- a/tests/lib/Authentication/Login/EmailLoginCommandTest.php +++ b/tests/lib/Authentication/Login/EmailLoginCommandTest.php @@ -35,7 +35,7 @@ class EmailLoginCommandTest extends ALoginCommandTest { /** @var IUserManager|MockObject */ private $userManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); diff --git a/tests/lib/Authentication/Login/FinishRememberedLoginCommandTest.php b/tests/lib/Authentication/Login/FinishRememberedLoginCommandTest.php index 33926aeea0..9cb3734922 100644 --- a/tests/lib/Authentication/Login/FinishRememberedLoginCommandTest.php +++ b/tests/lib/Authentication/Login/FinishRememberedLoginCommandTest.php @@ -34,7 +34,7 @@ class FinishRememberedLoginCommandTest extends ALoginCommandTest { /** @var Session|MockObject */ private $userSession; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userSession = $this->createMock(Session::class); diff --git a/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php b/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php index 1693830733..3b18c97a61 100644 --- a/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php +++ b/tests/lib/Authentication/Login/LoggedInCheckCommandTest.php @@ -35,7 +35,7 @@ class LoggedInCheckCommandTest extends ALoginCommandTest { /** @var ILogger|MockObject */ private $logger; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->logger = $this->createMock(ILogger::class); diff --git a/tests/lib/Authentication/Login/PreLoginHookCommandTest.php b/tests/lib/Authentication/Login/PreLoginHookCommandTest.php index 3329f3ad82..c067899ffc 100644 --- a/tests/lib/Authentication/Login/PreLoginHookCommandTest.php +++ b/tests/lib/Authentication/Login/PreLoginHookCommandTest.php @@ -35,7 +35,7 @@ class PreLoginHookCommandTest extends ALoginCommandTest { /** @var IUserManager|MockObject */ private $userManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(Manager::class); diff --git a/tests/lib/Authentication/Login/SetUserTimezoneCommandTest.php b/tests/lib/Authentication/Login/SetUserTimezoneCommandTest.php index a2ce656a14..14da73b93f 100644 --- a/tests/lib/Authentication/Login/SetUserTimezoneCommandTest.php +++ b/tests/lib/Authentication/Login/SetUserTimezoneCommandTest.php @@ -38,7 +38,7 @@ class SetUserTimezoneCommandTest extends ALoginCommandTest { /** @var ISession|MockObject */ private $session; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Authentication/Login/TwoFactorCommandTest.php b/tests/lib/Authentication/Login/TwoFactorCommandTest.php index 5f91d81252..3e8ad142cc 100644 --- a/tests/lib/Authentication/Login/TwoFactorCommandTest.php +++ b/tests/lib/Authentication/Login/TwoFactorCommandTest.php @@ -45,7 +45,7 @@ class TwoFactorCommandTest extends ALoginCommandTest { /** @var IURLGenerator|MockObject */ private $urlGenerator; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->twoFactorManager = $this->createMock(Manager::class); diff --git a/tests/lib/Authentication/Login/UidLoginCommandTest.php b/tests/lib/Authentication/Login/UidLoginCommandTest.php index 0a7889c227..c4dd3f1038 100644 --- a/tests/lib/Authentication/Login/UidLoginCommandTest.php +++ b/tests/lib/Authentication/Login/UidLoginCommandTest.php @@ -35,7 +35,7 @@ class UidLoginCommandTest extends ALoginCommandTest { /** @var Manager|MockObject */ private $userManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(Manager::class); diff --git a/tests/lib/Authentication/Login/UpdateLastPasswordConfirmCommandTest.php b/tests/lib/Authentication/Login/UpdateLastPasswordConfirmCommandTest.php index 5f5bd3032a..b66ecdde3c 100644 --- a/tests/lib/Authentication/Login/UpdateLastPasswordConfirmCommandTest.php +++ b/tests/lib/Authentication/Login/UpdateLastPasswordConfirmCommandTest.php @@ -34,7 +34,7 @@ class UpdateLastPasswordConfirmCommandTest extends ALoginCommandTest { /** @var ISession|MockObject */ private $session; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->session = $this->createMock(ISession::class); diff --git a/tests/lib/Authentication/Login/UserDisabledCheckCommandTest.php b/tests/lib/Authentication/Login/UserDisabledCheckCommandTest.php index 35d8ac63de..2a2f23162b 100644 --- a/tests/lib/Authentication/Login/UserDisabledCheckCommandTest.php +++ b/tests/lib/Authentication/Login/UserDisabledCheckCommandTest.php @@ -39,7 +39,7 @@ class UserDisabledCheckCommandTest extends ALoginCommandTest { /** @var ILogger|MockObject */ private $logger; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); diff --git a/tests/lib/Authentication/LoginCredentials/CredentialsTest.php b/tests/lib/Authentication/LoginCredentials/CredentialsTest.php index 308ccafb15..263db1bbb5 100644 --- a/tests/lib/Authentication/LoginCredentials/CredentialsTest.php +++ b/tests/lib/Authentication/LoginCredentials/CredentialsTest.php @@ -41,7 +41,7 @@ class CredentialsTest extends TestCase { /** @var Credentials */ private $credentials; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->uid = 'user123'; diff --git a/tests/lib/Authentication/LoginCredentials/StoreTest.php b/tests/lib/Authentication/LoginCredentials/StoreTest.php index 4588eae35f..b75e149888 100644 --- a/tests/lib/Authentication/LoginCredentials/StoreTest.php +++ b/tests/lib/Authentication/LoginCredentials/StoreTest.php @@ -51,7 +51,7 @@ class StoreTest extends TestCase { /** @var Store */ private $store; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->session = $this->createMock(ISession::class); diff --git a/tests/lib/Authentication/Token/DefaultTokenCleanupJobTest.php b/tests/lib/Authentication/Token/DefaultTokenCleanupJobTest.php index b8074d75b3..e4bc13fe5f 100644 --- a/tests/lib/Authentication/Token/DefaultTokenCleanupJobTest.php +++ b/tests/lib/Authentication/Token/DefaultTokenCleanupJobTest.php @@ -33,7 +33,7 @@ class DefaultTokenCleanupJobTest extends TestCase { private $job; private $tokenProvider; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tokenProvider = $this->getMockBuilder(Manager::class) diff --git a/tests/lib/Authentication/Token/DefaultTokenMapperTest.php b/tests/lib/Authentication/Token/DefaultTokenMapperTest.php index a40db4461d..fb20558c95 100644 --- a/tests/lib/Authentication/Token/DefaultTokenMapperTest.php +++ b/tests/lib/Authentication/Token/DefaultTokenMapperTest.php @@ -46,7 +46,7 @@ class DefaultTokenMapperTest extends TestCase { private $dbConnection; private $time; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->dbConnection = OC::$server->getDatabaseConnection(); diff --git a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php index 57144d0f00..b90a993193 100644 --- a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php +++ b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php @@ -53,7 +53,7 @@ class DefaultTokenProviderTest extends TestCase { /** @var int */ private $time; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->mapper = $this->createMock(DefaultTokenMapper::class); diff --git a/tests/lib/Authentication/Token/ManagerTest.php b/tests/lib/Authentication/Token/ManagerTest.php index 1f3fda1b15..6f64424364 100644 --- a/tests/lib/Authentication/Token/ManagerTest.php +++ b/tests/lib/Authentication/Token/ManagerTest.php @@ -46,7 +46,7 @@ class ManagerTest extends TestCase { /** @var Manager */ private $manager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->publicKeyTokenProvider = $this->createMock(PublicKeyTokenProvider::class); diff --git a/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php b/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php index b8c399b81f..b58001ee7b 100644 --- a/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php +++ b/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php @@ -47,7 +47,7 @@ class PublicKeyTokenMapperTest extends TestCase { /** @var int */ private $time; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->dbConnection = OC::$server->getDatabaseConnection(); diff --git a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php index 1b468839cb..aecbd969ee 100644 --- a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php +++ b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php @@ -54,7 +54,7 @@ class PublicKeyTokenProviderTest extends TestCase { /** @var int */ private $time; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->mapper = $this->createMock(PublicKeyTokenMapper::class); diff --git a/tests/lib/Authentication/Token/RemoteWipeTest.php b/tests/lib/Authentication/Token/RemoteWipeTest.php index 5773bb596a..2ca49d3615 100644 --- a/tests/lib/Authentication/Token/RemoteWipeTest.php +++ b/tests/lib/Authentication/Token/RemoteWipeTest.php @@ -51,7 +51,7 @@ class RemoteWipeTest extends TestCase { /** @var RemoteWipe */ private $remoteWipe; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tokenProvider = $this->createMock(IProvider::class); diff --git a/tests/lib/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDaoTest.php b/tests/lib/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDaoTest.php index 2402fcf9f7..67eb27cfde 100644 --- a/tests/lib/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDaoTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDaoTest.php @@ -41,7 +41,7 @@ class ProviderUserAssignmentDaoTest extends TestCase { /** @var ProviderUserAssignmentDao */ private $dao; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->dbConn = OC::$server->getDatabaseConnection(); diff --git a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php index e836e8d316..63d0e993f3 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php @@ -87,7 +87,7 @@ class ManagerTest extends TestCase { /** @var EventDispatcherInterface|MockObject */ private $eventDispatcher; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->user = $this->createMock(IUser::class); diff --git a/tests/lib/Authentication/TwoFactorAuth/MandatoryTwoFactorTest.php b/tests/lib/Authentication/TwoFactorAuth/MandatoryTwoFactorTest.php index 61ffb404dd..92d072608f 100644 --- a/tests/lib/Authentication/TwoFactorAuth/MandatoryTwoFactorTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/MandatoryTwoFactorTest.php @@ -45,7 +45,7 @@ class MandatoryTwoFactorTest extends TestCase { /** @var MandatoryTwoFactor */ private $mandatoryTwoFactor; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php b/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php index 55a1e17392..634ab97a8b 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php @@ -43,7 +43,7 @@ class ProviderLoaderTest extends TestCase { /** @var ProviderLoader */ private $loader; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->appManager = $this->createMock(IAppManager::class); diff --git a/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php b/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php index 736dfdb913..f776e244c2 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php @@ -47,7 +47,7 @@ class ProviderManagerTest extends TestCase { /** @var ProviderManager */ private $providerManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->providerLoader = $this->createMock(ProviderLoader::class); diff --git a/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php b/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php index ad29377e55..2f59d14992 100644 --- a/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php @@ -45,7 +45,7 @@ class RegistryTest extends TestCase { /** @var Registry */ private $registry; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->dao = $this->createMock(ProviderUserAssignmentDao::class); diff --git a/tests/lib/AutoLoaderTest.php b/tests/lib/AutoLoaderTest.php index 38ba29bc08..b3ca21a90d 100644 --- a/tests/lib/AutoLoaderTest.php +++ b/tests/lib/AutoLoaderTest.php @@ -14,7 +14,7 @@ class AutoLoaderTest extends TestCase { */ private $loader; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->loader = new \OC\AutoLoader([]); } diff --git a/tests/lib/Avatar/AvatarManagerTest.php b/tests/lib/Avatar/AvatarManagerTest.php index ae3ee89cec..812802f8c5 100644 --- a/tests/lib/Avatar/AvatarManagerTest.php +++ b/tests/lib/Avatar/AvatarManagerTest.php @@ -51,7 +51,7 @@ class AvatarManagerTest extends \Test\TestCase { /** @var AvatarManager | \PHPUnit_Framework_MockObject_MockObject */ private $avatarManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(Manager::class); diff --git a/tests/lib/Avatar/UserAvatarTest.php b/tests/lib/Avatar/UserAvatarTest.php index 2ce9266cf4..19be534e0e 100644 --- a/tests/lib/Avatar/UserAvatarTest.php +++ b/tests/lib/Avatar/UserAvatarTest.php @@ -31,7 +31,7 @@ class UserAvatarTest extends \Test\TestCase { /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */ private $config; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->folder = $this->createMock(SimpleFolder::class); diff --git a/tests/lib/BackgroundJob/JobListTest.php b/tests/lib/BackgroundJob/JobListTest.php index 78299e8154..7e099b23d0 100644 --- a/tests/lib/BackgroundJob/JobListTest.php +++ b/tests/lib/BackgroundJob/JobListTest.php @@ -33,7 +33,7 @@ class JobListTest extends TestCase { /** @var \OCP\AppFramework\Utility\ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $timeFactory; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); diff --git a/tests/lib/BackgroundJob/JobTest.php b/tests/lib/BackgroundJob/JobTest.php index ecd8bde862..6e5474e597 100644 --- a/tests/lib/BackgroundJob/JobTest.php +++ b/tests/lib/BackgroundJob/JobTest.php @@ -13,7 +13,7 @@ use OCP\ILogger; class JobTest extends \Test\TestCase { private $run = false; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->run = false; } diff --git a/tests/lib/BackgroundJob/QueuedJobTest.php b/tests/lib/BackgroundJob/QueuedJobTest.php index 73b245f93a..9378816ce6 100644 --- a/tests/lib/BackgroundJob/QueuedJobTest.php +++ b/tests/lib/BackgroundJob/QueuedJobTest.php @@ -35,7 +35,7 @@ class QueuedJobTest extends \Test\TestCase { */ private $jobList; - protected function setup() { + protected function setUp(): void { parent::setUp(); $this->jobList = new DummyJobList(); diff --git a/tests/lib/BackgroundJob/TimedJobTest.php b/tests/lib/BackgroundJob/TimedJobTest.php index e684ad8c1e..12f1c43add 100644 --- a/tests/lib/BackgroundJob/TimedJobTest.php +++ b/tests/lib/BackgroundJob/TimedJobTest.php @@ -44,7 +44,7 @@ class TimedJobTest extends \Test\TestCase { /** @var ITimeFactory */ private $time; - protected function setup() { + protected function setUp(): void { parent::setUp(); $this->jobList = new DummyJobList(); diff --git a/tests/lib/Cache/CappedMemoryCacheTest.php b/tests/lib/Cache/CappedMemoryCacheTest.php index 243a1ad74f..3b8e5bd7fb 100644 --- a/tests/lib/Cache/CappedMemoryCacheTest.php +++ b/tests/lib/Cache/CappedMemoryCacheTest.php @@ -28,7 +28,7 @@ namespace Test\Cache; * @package Test\Cache */ class CappedMemoryCacheTest extends TestCache { - public function setUp() { + public function setUp(): void { parent::setUp(); $this->instance = new \OC\Cache\CappedMemoryCache(); } diff --git a/tests/lib/Cache/FileCacheTest.php b/tests/lib/Cache/FileCacheTest.php index a90fc6678e..26306458d8 100644 --- a/tests/lib/Cache/FileCacheTest.php +++ b/tests/lib/Cache/FileCacheTest.php @@ -52,7 +52,7 @@ class FileCacheTest extends TestCache { //$this->skipUnless(OC_User::isLoggedIn()); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); //clear all proxies and hooks so we can do clean testing @@ -87,7 +87,7 @@ class FileCacheTest extends TestCache { $this->instance->set('hack', 'hack'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->remove('hack', 'hack'); } diff --git a/tests/lib/Cache/TestCache.php b/tests/lib/Cache/TestCache.php index 2642c014a7..62341a5698 100644 --- a/tests/lib/Cache/TestCache.php +++ b/tests/lib/Cache/TestCache.php @@ -14,7 +14,7 @@ abstract class TestCache extends \Test\TestCase { */ protected $instance; - protected function tearDown() { + protected function tearDown(): void { if($this->instance) { $this->instance->clear(); } diff --git a/tests/lib/Calendar/ManagerTest.php b/tests/lib/Calendar/ManagerTest.php index dca9368558..fa459203da 100644 --- a/tests/lib/Calendar/ManagerTest.php +++ b/tests/lib/Calendar/ManagerTest.php @@ -32,7 +32,7 @@ class ManagerTest extends TestCase { /** @var Manager */ private $manager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->manager = new Manager(); diff --git a/tests/lib/Calendar/Resource/ManagerTest.php b/tests/lib/Calendar/Resource/ManagerTest.php index 3e065c6990..71679a86a8 100644 --- a/tests/lib/Calendar/Resource/ManagerTest.php +++ b/tests/lib/Calendar/Resource/ManagerTest.php @@ -36,7 +36,7 @@ class ManagerTest extends TestCase { /** @var IServerContainer */ private $server; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->server = $this->createMock(IServerContainer::class); diff --git a/tests/lib/Calendar/Room/ManagerTest.php b/tests/lib/Calendar/Room/ManagerTest.php index 9a85132aa3..56f05544e2 100644 --- a/tests/lib/Calendar/Room/ManagerTest.php +++ b/tests/lib/Calendar/Room/ManagerTest.php @@ -36,7 +36,7 @@ class ManagerTest extends TestCase { /** @var IServerContainer */ private $server; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->server = $this->createMock(IServerContainer::class); diff --git a/tests/lib/CapabilitiesManagerTest.php b/tests/lib/CapabilitiesManagerTest.php index c967b77130..f4222a83ef 100644 --- a/tests/lib/CapabilitiesManagerTest.php +++ b/tests/lib/CapabilitiesManagerTest.php @@ -35,7 +35,7 @@ class CapabilitiesManagerTest extends TestCase { /** @var ILogger */ private $logger; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->logger = $this->getMockBuilder(ILogger::class)->getMock(); $this->manager = new CapabilitiesManager($this->logger); diff --git a/tests/lib/Collaboration/Collaborators/GroupPluginTest.php b/tests/lib/Collaboration/Collaborators/GroupPluginTest.php index 36d98ee302..d5a84e9b1b 100644 --- a/tests/lib/Collaboration/Collaborators/GroupPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/GroupPluginTest.php @@ -60,7 +60,7 @@ class GroupPluginTest extends TestCase { /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */ protected $user; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php index e4be6a73ee..40fee52f23 100644 --- a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php @@ -55,7 +55,7 @@ class LookupPluginTest extends TestCase { /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ protected $logger; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userSession = $this->createMock(IUserSession::class); diff --git a/tests/lib/Collaboration/Collaborators/MailPluginTest.php b/tests/lib/Collaboration/Collaborators/MailPluginTest.php index a9d0244d38..af5cb7d303 100644 --- a/tests/lib/Collaboration/Collaborators/MailPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/MailPluginTest.php @@ -59,7 +59,7 @@ class MailPluginTest extends TestCase { /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ protected $userSession; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php index 560e72a984..03140ddc6e 100644 --- a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php +++ b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php @@ -57,7 +57,7 @@ class RemotePluginTest extends TestCase { /** @var SearchResult */ protected $searchResult; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); diff --git a/tests/lib/Collaboration/Collaborators/SearchResultTest.php b/tests/lib/Collaboration/Collaborators/SearchResultTest.php index 90ea90237a..717693e759 100644 --- a/tests/lib/Collaboration/Collaborators/SearchResultTest.php +++ b/tests/lib/Collaboration/Collaborators/SearchResultTest.php @@ -39,7 +39,7 @@ class SearchResultTest extends TestCase { /** @var ISearch */ protected $search; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->container = $this->createMock(IContainer::class); diff --git a/tests/lib/Collaboration/Collaborators/SearchTest.php b/tests/lib/Collaboration/Collaborators/SearchTest.php index 80e6c7f0be..9116352ef1 100644 --- a/tests/lib/Collaboration/Collaborators/SearchTest.php +++ b/tests/lib/Collaboration/Collaborators/SearchTest.php @@ -39,7 +39,7 @@ class SearchTest extends TestCase { /** @var ISearch */ protected $search; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->container = $this->createMock(IContainer::class); diff --git a/tests/lib/Collaboration/Collaborators/UserPluginTest.php b/tests/lib/Collaboration/Collaborators/UserPluginTest.php index 7513f9da5b..b9f10a54fa 100644 --- a/tests/lib/Collaboration/Collaborators/UserPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/UserPluginTest.php @@ -62,7 +62,7 @@ class UserPluginTest extends TestCase { /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */ protected $user; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Command/AsyncBusTest.php b/tests/lib/Command/AsyncBusTest.php index 8f07738bec..59a80320f4 100644 --- a/tests/lib/Command/AsyncBusTest.php +++ b/tests/lib/Command/AsyncBusTest.php @@ -89,7 +89,7 @@ abstract class AsyncBusTest extends TestCase { */ abstract protected function createBus(); - public function setUp() { + public function setUp(): void { self::$lastCommand = ''; } diff --git a/tests/lib/Command/CronBusTest.php b/tests/lib/Command/CronBusTest.php index 9bf53ba92d..a28ed0fbed 100644 --- a/tests/lib/Command/CronBusTest.php +++ b/tests/lib/Command/CronBusTest.php @@ -31,7 +31,7 @@ class CronBusTest extends AsyncBusTest { private $jobList; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->jobList = new DummyJobList(); diff --git a/tests/lib/Command/Integrity/SignAppTest.php b/tests/lib/Command/Integrity/SignAppTest.php index 2615c6afc1..b30d465fca 100644 --- a/tests/lib/Command/Integrity/SignAppTest.php +++ b/tests/lib/Command/Integrity/SignAppTest.php @@ -39,7 +39,7 @@ class SignAppTest extends TestCase { /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ private $urlGenerator; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->checker = $this->createMock(Checker::class); $this->fileAccessHelper = $this->createMock(FileAccessHelper::class); diff --git a/tests/lib/Command/Integrity/SignCoreTest.php b/tests/lib/Command/Integrity/SignCoreTest.php index e601b4a1a9..c496b86400 100644 --- a/tests/lib/Command/Integrity/SignCoreTest.php +++ b/tests/lib/Command/Integrity/SignCoreTest.php @@ -36,7 +36,7 @@ class SignCoreTest extends TestCase { /** @var SignCore */ private $signCore; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->checker = $this->createMock(Checker::class); $this->fileAccessHelper = $this->createMock(FileAccessHelper::class); diff --git a/tests/lib/Comments/ManagerTest.php b/tests/lib/Comments/ManagerTest.php index 28002ff42c..8b7bf50f95 100644 --- a/tests/lib/Comments/ManagerTest.php +++ b/tests/lib/Comments/ManagerTest.php @@ -21,7 +21,7 @@ class ManagerTest extends TestCase { /** @var IDBConnection */ private $connection; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); diff --git a/tests/lib/ConfigTest.php b/tests/lib/ConfigTest.php index 2a4c962034..109f7471e9 100644 --- a/tests/lib/ConfigTest.php +++ b/tests/lib/ConfigTest.php @@ -20,7 +20,7 @@ class ConfigTest extends TestCase { /** @var string */ private $randomTmpDir; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->randomTmpDir = \OC::$server->getTempManager()->getTemporaryFolder(); @@ -29,7 +29,7 @@ class ConfigTest extends TestCase { $this->config = new \OC\Config($this->randomTmpDir, 'testconfig.php'); } - protected function tearDown() { + protected function tearDown(): void { unlink($this->configFile); parent::tearDown(); } diff --git a/tests/lib/Contacts/ContactsMenu/ActionFactoryTest.php b/tests/lib/Contacts/ContactsMenu/ActionFactoryTest.php index d1273c2b9a..54106bbb64 100644 --- a/tests/lib/Contacts/ContactsMenu/ActionFactoryTest.php +++ b/tests/lib/Contacts/ContactsMenu/ActionFactoryTest.php @@ -33,7 +33,7 @@ class ActionFactoryTest extends TestCase { /** @var ActionFactory */ private $actionFactory; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->actionFactory = new ActionFactory(); diff --git a/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php b/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php index fb5e815447..6460ef20d0 100644 --- a/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php +++ b/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php @@ -51,7 +51,7 @@ class ActionProviderStoreTest extends TestCase { /** @var ActionProviderStore */ private $actionProviderStore; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->serverContainer = $this->createMock(IServerContainer::class); diff --git a/tests/lib/Contacts/ContactsMenu/Actions/LinkActionTest.php b/tests/lib/Contacts/ContactsMenu/Actions/LinkActionTest.php index 31654b4091..da2d6ac451 100644 --- a/tests/lib/Contacts/ContactsMenu/Actions/LinkActionTest.php +++ b/tests/lib/Contacts/ContactsMenu/Actions/LinkActionTest.php @@ -31,7 +31,7 @@ class LinkActionTest extends TestCase { private $action; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->action = new LinkAction(); diff --git a/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php b/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php index cf801396cb..49dc1d9d82 100644 --- a/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php +++ b/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php @@ -46,7 +46,7 @@ class ContactsStoreTest extends TestCase { /** @var IConfig|PHPUnit_Framework_MockObject_MockObject */ private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->contactsManager = $this->createMock(IManager::class); diff --git a/tests/lib/Contacts/ContactsMenu/EntryTest.php b/tests/lib/Contacts/ContactsMenu/EntryTest.php index e28248fb0f..1ea4782a30 100644 --- a/tests/lib/Contacts/ContactsMenu/EntryTest.php +++ b/tests/lib/Contacts/ContactsMenu/EntryTest.php @@ -33,7 +33,7 @@ class EntryTest extends TestCase { /** @var Entry */ private $entry; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->entry = new Entry(); diff --git a/tests/lib/Contacts/ContactsMenu/ManagerTest.php b/tests/lib/Contacts/ContactsMenu/ManagerTest.php index d1630e8dde..b78420e542 100644 --- a/tests/lib/Contacts/ContactsMenu/ManagerTest.php +++ b/tests/lib/Contacts/ContactsMenu/ManagerTest.php @@ -52,7 +52,7 @@ class ManagerTest extends TestCase { /** @var Manager */ private $manager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->contactsStore = $this->createMock(ContactsStore::class); diff --git a/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php b/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php index 353c8d6f58..85ffd1e72b 100644 --- a/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php +++ b/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php @@ -43,7 +43,7 @@ class EMailproviderTest extends TestCase { /** @var EMailProvider */ private $provider; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->actionFactory = $this->createMock(IActionFactory::class); diff --git a/tests/lib/ContactsManagerTest.php b/tests/lib/ContactsManagerTest.php index c460330e7e..9e8b75fbf4 100644 --- a/tests/lib/ContactsManagerTest.php +++ b/tests/lib/ContactsManagerTest.php @@ -9,7 +9,7 @@ class ContactsManagerTest extends \Test\TestCase { /** @var \OC\ContactsManager */ private $cm; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->cm = new \OC\ContactsManager(); } diff --git a/tests/lib/DB/ConnectionTest.php b/tests/lib/DB/ConnectionTest.php index 02dd6a1495..4683c53d33 100644 --- a/tests/lib/DB/ConnectionTest.php +++ b/tests/lib/DB/ConnectionTest.php @@ -26,12 +26,12 @@ class ConnectionTest extends \Test\TestCase { */ private $connection; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { self::dropTestTable(); parent::setUpBeforeClass(); } - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { self::dropTestTable(); parent::tearDownAfterClass(); } @@ -42,12 +42,12 @@ class ConnectionTest extends \Test\TestCase { } } - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); $this->connection->dropTable('table'); } diff --git a/tests/lib/DB/DBSchemaTest.php b/tests/lib/DB/DBSchemaTest.php index cc6059c163..5fb68fdf25 100644 --- a/tests/lib/DB/DBSchemaTest.php +++ b/tests/lib/DB/DBSchemaTest.php @@ -27,7 +27,7 @@ class DBSchemaTest extends TestCase { /** @var ITempManager */ protected $tempManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tempManager = \OC::$server->getTempManager(); @@ -50,7 +50,7 @@ class DBSchemaTest extends TestCase { $this->table2 = $r.'cntcts_cards'; } - protected function tearDown() { + protected function tearDown(): void { unlink($this->schema_file); unlink($this->schema_file2); diff --git a/tests/lib/DB/LegacyDBTest.php b/tests/lib/DB/LegacyDBTest.php index 578d28139b..e0bb1055be 100644 --- a/tests/lib/DB/LegacyDBTest.php +++ b/tests/lib/DB/LegacyDBTest.php @@ -21,7 +21,7 @@ class LegacyDBTest extends \Test\TestCase { protected static $schema_file; protected $test_prefix; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { self::$schema_file = \OC::$server->getTempManager()->getTemporaryFile(); } @@ -56,7 +56,7 @@ class LegacyDBTest extends \Test\TestCase { */ private $text_table; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $dbFile = \OC::$SERVERROOT.'/tests/data/db_structure.xml'; @@ -76,7 +76,7 @@ class LegacyDBTest extends \Test\TestCase { $this->text_table = $this->test_prefix.'text_table'; } - protected function tearDown() { + protected function tearDown(): void { OC_DB::removeDBStructure(self::$schema_file); unlink(self::$schema_file); diff --git a/tests/lib/DB/MDB2SchemaManagerTest.php b/tests/lib/DB/MDB2SchemaManagerTest.php index 75572bb36a..8c9290c56b 100644 --- a/tests/lib/DB/MDB2SchemaManagerTest.php +++ b/tests/lib/DB/MDB2SchemaManagerTest.php @@ -20,7 +20,7 @@ use Doctrine\DBAL\Platforms\OraclePlatform; */ class MDB2SchemaManagerTest extends \Test\TestCase { - protected function tearDown() { + protected function tearDown(): void { // do not drop the table for Oracle as it will create a bogus transaction // that will break the following test suites requiring transactions if (\OC::$server->getConfig()->getSystemValue('dbtype', 'sqlite') !== 'oci') { diff --git a/tests/lib/DB/MigrationsTest.php b/tests/lib/DB/MigrationsTest.php index 87547debe8..8f38b3addd 100644 --- a/tests/lib/DB/MigrationsTest.php +++ b/tests/lib/DB/MigrationsTest.php @@ -36,7 +36,7 @@ class MigrationsTest extends \Test\TestCase { /** @var \PHPUnit_Framework_MockObject_MockObject | IDBConnection $db */ private $db; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->db = $this->createMock(Connection::class); diff --git a/tests/lib/DB/MigratorTest.php b/tests/lib/DB/MigratorTest.php index e9c52015db..ca778fd4e2 100644 --- a/tests/lib/DB/MigratorTest.php +++ b/tests/lib/DB/MigratorTest.php @@ -44,7 +44,7 @@ class MigratorTest extends \Test\TestCase { /** @var string */ private $tableNameTmp; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = \OC::$server->getConfig(); @@ -61,7 +61,7 @@ class MigratorTest extends \Test\TestCase { return strtolower($this->getUniqueID($this->config->getSystemValue('dbtableprefix', 'oc_') . 'test_')); } - protected function tearDown() { + protected function tearDown(): void { // Try to delete if exists (IF EXISTS NOT SUPPORTED IN ORACLE) try { $this->connection->exec('DROP TABLE ' . $this->connection->quoteIdentifier($this->tableNameTmp)); diff --git a/tests/lib/DB/MySqlMigrationTest.php b/tests/lib/DB/MySqlMigrationTest.php index 3bbe89fe02..5ebbd273c3 100644 --- a/tests/lib/DB/MySqlMigrationTest.php +++ b/tests/lib/DB/MySqlMigrationTest.php @@ -21,7 +21,7 @@ class MySqlMigrationTest extends \Test\TestCase { /** @var string */ private $tableName; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -34,7 +34,7 @@ class MySqlMigrationTest extends \Test\TestCase { $this->connection->exec("CREATE TABLE $this->tableName(b BIT, e ENUM('1','2','3','4'))"); } - protected function tearDown() { + protected function tearDown(): void { $this->connection->getSchemaManager()->dropTable($this->tableName); parent::tearDown(); } diff --git a/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php b/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php index c71e83f5fd..8e0ce2fe93 100644 --- a/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php +++ b/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php @@ -31,7 +31,7 @@ class ExpressionBuilderDBTest extends TestCase { /** @var \Doctrine\DBAL\Connection|\OCP\IDBConnection */ protected $connection; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); diff --git a/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php b/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php index f5dc2a0724..b3e9124e7d 100644 --- a/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php +++ b/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php @@ -43,7 +43,7 @@ class ExpressionBuilderTest extends TestCase { /** @var \Doctrine\DBAL\Connection|\OCP\IDBConnection */ protected $connection; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); diff --git a/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php b/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php index a8af7f4fe0..d7617125fa 100644 --- a/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php +++ b/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php @@ -35,7 +35,7 @@ class FunctionBuilderTest extends TestCase { /** @var \Doctrine\DBAL\Connection|\OCP\IDBConnection */ protected $connection; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); diff --git a/tests/lib/DB/QueryBuilder/QueryBuilderTest.php b/tests/lib/DB/QueryBuilder/QueryBuilderTest.php index fa1c4add0a..e9878d33d8 100644 --- a/tests/lib/DB/QueryBuilder/QueryBuilderTest.php +++ b/tests/lib/DB/QueryBuilder/QueryBuilderTest.php @@ -49,7 +49,7 @@ class QueryBuilderTest extends \Test\TestCase { /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ protected $logger; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); diff --git a/tests/lib/DB/QueryBuilder/QuoteHelperTest.php b/tests/lib/DB/QueryBuilder/QuoteHelperTest.php index 3c1abd72f6..3b5562b69c 100644 --- a/tests/lib/DB/QueryBuilder/QuoteHelperTest.php +++ b/tests/lib/DB/QueryBuilder/QuoteHelperTest.php @@ -31,7 +31,7 @@ class QuoteHelperTest extends \Test\TestCase { /** @var QuoteHelper */ protected $helper; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->helper = new QuoteHelper(); diff --git a/tests/lib/DB/SchemaDiffTest.php b/tests/lib/DB/SchemaDiffTest.php index f74d800bfe..7896369857 100644 --- a/tests/lib/DB/SchemaDiffTest.php +++ b/tests/lib/DB/SchemaDiffTest.php @@ -50,7 +50,7 @@ class SchemaDiffTest extends TestCase { private $schemaFile; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->schemaFile = \OC::$server->getTempManager()->getTemporaryFile(); @@ -61,7 +61,7 @@ class SchemaDiffTest extends TestCase { $this->testPrefix= strtolower($this->getUniqueID($this->config->getSystemValue('dbtableprefix', 'oc_'), 3)); } - protected function tearDown() { + protected function tearDown(): void { $this->manager->removeDBStructure($this->schemaFile); parent::tearDown(); } diff --git a/tests/lib/DB/SqliteMigrationTest.php b/tests/lib/DB/SqliteMigrationTest.php index 4712fc6d70..ecc6cbe095 100644 --- a/tests/lib/DB/SqliteMigrationTest.php +++ b/tests/lib/DB/SqliteMigrationTest.php @@ -21,7 +21,7 @@ class SqliteMigrationTest extends \Test\TestCase { /** @var string */ private $tableName; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -34,7 +34,7 @@ class SqliteMigrationTest extends \Test\TestCase { $this->connection->exec("CREATE TABLE $this->tableName(t0 tinyint unsigned, t1 tinyint)"); } - protected function tearDown() { + protected function tearDown(): void { $this->connection->getSchemaManager()->dropTable($this->tableName); parent::tearDown(); } diff --git a/tests/lib/DateTimeFormatterTest.php b/tests/lib/DateTimeFormatterTest.php index deb6a7c783..f7f6f6633c 100644 --- a/tests/lib/DateTimeFormatterTest.php +++ b/tests/lib/DateTimeFormatterTest.php @@ -18,7 +18,7 @@ class DateTimeFormatterTest extends TestCase { static protected $defaultTimeZone; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); self::$defaultTimeZone = date_default_timezone_get(); date_default_timezone_set('UTC'); @@ -27,12 +27,12 @@ class DateTimeFormatterTest extends TestCase { self::$oneYear = self::$oneDay * 365; } - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { date_default_timezone_set(self::$defaultTimeZone); parent::tearDownAfterClass(); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->formatter = new \OC\DateTimeFormatter(new \DateTimeZone('UTC'), \OC::$server->getL10N('lib', 'en')); } diff --git a/tests/lib/Diagnostics/EventLoggerTest.php b/tests/lib/Diagnostics/EventLoggerTest.php index 2d0c82ba72..18009ea26f 100644 --- a/tests/lib/Diagnostics/EventLoggerTest.php +++ b/tests/lib/Diagnostics/EventLoggerTest.php @@ -29,7 +29,7 @@ class EventLoggerTest extends TestCase { /** @var \OC\Diagnostics\EventLogger */ private $logger; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->logger = new EventLogger(); diff --git a/tests/lib/Diagnostics/QueryLoggerTest.php b/tests/lib/Diagnostics/QueryLoggerTest.php index 99de60ed8e..32c17064f1 100644 --- a/tests/lib/Diagnostics/QueryLoggerTest.php +++ b/tests/lib/Diagnostics/QueryLoggerTest.php @@ -29,7 +29,7 @@ class QueryLoggerTest extends TestCase { /** @var \OC\Diagnostics\QueryLogger */ private $logger; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->logger = new QueryLogger(); diff --git a/tests/lib/Encryption/DecryptAllTest.php b/tests/lib/Encryption/DecryptAllTest.php index 158e52f4a0..75ea3f8ef5 100644 --- a/tests/lib/Encryption/DecryptAllTest.php +++ b/tests/lib/Encryption/DecryptAllTest.php @@ -67,7 +67,7 @@ class DecryptAllTest extends TestCase { /** @var DecryptAll */ protected $instance; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userManager = $this->getMockBuilder(IUserManager::class) diff --git a/tests/lib/Encryption/EncryptionWrapperTest.php b/tests/lib/Encryption/EncryptionWrapperTest.php index 6a51d76975..8e9e774347 100644 --- a/tests/lib/Encryption/EncryptionWrapperTest.php +++ b/tests/lib/Encryption/EncryptionWrapperTest.php @@ -43,7 +43,7 @@ class EncryptionWrapperTest extends TestCase { /** @var \PHPUnit_Framework_MockObject_MockObject | \OC\Memcache\ArrayCache */ private $arrayCache; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->arrayCache = $this->createMock(ArrayCache::class); diff --git a/tests/lib/Encryption/Keys/StorageTest.php b/tests/lib/Encryption/Keys/StorageTest.php index cd8f1e9b95..611044ba92 100644 --- a/tests/lib/Encryption/Keys/StorageTest.php +++ b/tests/lib/Encryption/Keys/StorageTest.php @@ -42,7 +42,7 @@ class StorageTest extends TestCase { /** @var \PHPUnit_Framework_MockObject_MockObject */ protected $config; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->util = $this->getMockBuilder('OC\Encryption\Util') diff --git a/tests/lib/Encryption/ManagerTest.php b/tests/lib/Encryption/ManagerTest.php index 6523407495..0919bda36b 100644 --- a/tests/lib/Encryption/ManagerTest.php +++ b/tests/lib/Encryption/ManagerTest.php @@ -35,7 +35,7 @@ class ManagerTest extends TestCase { /** @var ArrayCache|\PHPUnit_Framework_MockObject_MockObject */ private $arrayCache; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); $this->logger = $this->createMock(ILogger::class); diff --git a/tests/lib/Encryption/UpdateTest.php b/tests/lib/Encryption/UpdateTest.php index 68639ad6e2..28d7ca8116 100644 --- a/tests/lib/Encryption/UpdateTest.php +++ b/tests/lib/Encryption/UpdateTest.php @@ -53,7 +53,7 @@ class UpdateTest extends TestCase { /** @var \OC\Encryption\File | \PHPUnit_Framework_MockObject_MockObject */ private $fileHelper; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->view = $this->getMockBuilder(View::class) diff --git a/tests/lib/Encryption/UtilTest.php b/tests/lib/Encryption/UtilTest.php index 1e1b21d367..ee616d2079 100644 --- a/tests/lib/Encryption/UtilTest.php +++ b/tests/lib/Encryption/UtilTest.php @@ -32,7 +32,7 @@ class UtilTest extends TestCase { /** @var \OC\Encryption\Util */ private $util; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->view = $this->getMockBuilder(View::class) ->disableOriginalConstructor() diff --git a/tests/lib/Federation/CloudIdManagerTest.php b/tests/lib/Federation/CloudIdManagerTest.php index fe673588bb..bd62a8ac02 100644 --- a/tests/lib/Federation/CloudIdManagerTest.php +++ b/tests/lib/Federation/CloudIdManagerTest.php @@ -28,7 +28,7 @@ class CloudIdManagerTest extends TestCase { /** @var CloudIdManager */ private $cloudIdManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->cloudIdManager = new CloudIdManager(); } diff --git a/tests/lib/Files/AppData/AppDataTest.php b/tests/lib/Files/AppData/AppDataTest.php index a9353540ff..3932e308de 100644 --- a/tests/lib/Files/AppData/AppDataTest.php +++ b/tests/lib/Files/AppData/AppDataTest.php @@ -42,7 +42,7 @@ class AppDataTest extends \Test\TestCase { /** @var IAppData */ private $appData; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->rootFolder = $this->createMock(IRootFolder::class); diff --git a/tests/lib/Files/AppData/FactoryTest.php b/tests/lib/Files/AppData/FactoryTest.php index 9b7529b18d..ceed1f4ed3 100644 --- a/tests/lib/Files/AppData/FactoryTest.php +++ b/tests/lib/Files/AppData/FactoryTest.php @@ -37,7 +37,7 @@ class FactoryTest extends \Test\TestCase { /** @var Factory */ private $factory; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->rootFolder = $this->createMock(IRootFolder::class); diff --git a/tests/lib/Files/Cache/CacheTest.php b/tests/lib/Files/Cache/CacheTest.php index ccdfbbd065..b2816c0309 100644 --- a/tests/lib/Files/Cache/CacheTest.php +++ b/tests/lib/Files/Cache/CacheTest.php @@ -777,7 +777,7 @@ class CacheTest extends \Test\TestCase { $this->cache->remove("sub"); } - protected function tearDown() { + protected function tearDown(): void { if ($this->cache) { $this->cache->clear(); } @@ -785,7 +785,7 @@ class CacheTest extends \Test\TestCase { parent::tearDown(); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->storage = new \OC\Files\Storage\Temporary(array()); diff --git a/tests/lib/Files/Cache/HomeCacheTest.php b/tests/lib/Files/Cache/HomeCacheTest.php index a144b8cabb..51fc2e5bc9 100644 --- a/tests/lib/Files/Cache/HomeCacheTest.php +++ b/tests/lib/Files/Cache/HomeCacheTest.php @@ -66,7 +66,7 @@ class HomeCacheTest extends \Test\TestCase { */ private $user; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->user = new DummyUser('foo', \OC::$server->getTempManager()->getTemporaryFolder()); diff --git a/tests/lib/Files/Cache/MoveFromCacheTraitTest.php b/tests/lib/Files/Cache/MoveFromCacheTraitTest.php index 3d4a55c072..f93b95b5fe 100644 --- a/tests/lib/Files/Cache/MoveFromCacheTraitTest.php +++ b/tests/lib/Files/Cache/MoveFromCacheTraitTest.php @@ -20,7 +20,7 @@ class FallBackCrossCacheMoveCache extends \OC\Files\Cache\Cache { * @group DB */ class MoveFromCacheTraitTest extends CacheTest { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->storage = new \OC\Files\Storage\Temporary(array()); diff --git a/tests/lib/Files/Cache/PropagatorTest.php b/tests/lib/Files/Cache/PropagatorTest.php index 402b29c8c3..bbf3632946 100644 --- a/tests/lib/Files/Cache/PropagatorTest.php +++ b/tests/lib/Files/Cache/PropagatorTest.php @@ -20,7 +20,7 @@ class PropagatorTest extends TestCase { /** @var IStorage */ private $storage; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->storage = new Temporary(); $this->storage->mkdir('foo/bar'); diff --git a/tests/lib/Files/Cache/QuerySearchHelperTest.php b/tests/lib/Files/Cache/QuerySearchHelperTest.php index addeac7135..5a9d302209 100644 --- a/tests/lib/Files/Cache/QuerySearchHelperTest.php +++ b/tests/lib/Files/Cache/QuerySearchHelperTest.php @@ -48,7 +48,7 @@ class QuerySearchHelperTest extends TestCase { /** @var integer */ private $numericStorageId; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->builder = \OC::$server->getDatabaseConnection()->getQueryBuilder(); $this->mimetypeLoader = $this->createMock(IMimeTypeLoader::class); @@ -83,7 +83,7 @@ class QuerySearchHelperTest extends TestCase { ->where($this->builder->expr()->eq('storage', new Literal($this->numericStorageId))); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); $builder = \OC::$server->getDatabaseConnection()->getQueryBuilder(); diff --git a/tests/lib/Files/Cache/ScannerTest.php b/tests/lib/Files/Cache/ScannerTest.php index 0f5335f441..1c0a8b0e0e 100644 --- a/tests/lib/Files/Cache/ScannerTest.php +++ b/tests/lib/Files/Cache/ScannerTest.php @@ -33,7 +33,7 @@ class ScannerTest extends \Test\TestCase { */ private $cache; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->storage = new \OC\Files\Storage\Temporary(array()); @@ -41,7 +41,7 @@ class ScannerTest extends \Test\TestCase { $this->cache = new \OC\Files\Cache\Cache($this->storage); } - protected function tearDown() { + protected function tearDown(): void { if ($this->cache) { $this->cache->clear(); } diff --git a/tests/lib/Files/Cache/UpdaterLegacyTest.php b/tests/lib/Files/Cache/UpdaterLegacyTest.php index a0cc1c5d89..e20cfe2ac1 100644 --- a/tests/lib/Files/Cache/UpdaterLegacyTest.php +++ b/tests/lib/Files/Cache/UpdaterLegacyTest.php @@ -37,7 +37,7 @@ class UpdaterLegacyTest extends \Test\TestCase { private static $user; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->storage = new \OC\Files\Storage\Temporary(array()); @@ -68,7 +68,7 @@ class UpdaterLegacyTest extends \Test\TestCase { \OC_Hook::clear('OC_Filesystem'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->cache) { $this->cache->clear(); } diff --git a/tests/lib/Files/Cache/UpdaterTest.php b/tests/lib/Files/Cache/UpdaterTest.php index 54fb3f3fc9..8dc5893007 100644 --- a/tests/lib/Files/Cache/UpdaterTest.php +++ b/tests/lib/Files/Cache/UpdaterTest.php @@ -40,7 +40,7 @@ class UpdaterTest extends \Test\TestCase { */ protected $updater; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->loginAsUser(); @@ -50,7 +50,7 @@ class UpdaterTest extends \Test\TestCase { $this->cache = $this->storage->getCache(); } - protected function tearDown() { + protected function tearDown(): void { Filesystem::clearMounts(); $this->logout(); diff --git a/tests/lib/Files/Cache/WatcherTest.php b/tests/lib/Files/Cache/WatcherTest.php index d4aa9ac875..18f0ebe98a 100644 --- a/tests/lib/Files/Cache/WatcherTest.php +++ b/tests/lib/Files/Cache/WatcherTest.php @@ -22,13 +22,13 @@ class WatcherTest extends \Test\TestCase { */ private $storages = array(); - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->loginAsUser(); } - protected function tearDown() { + protected function tearDown(): void { foreach ($this->storages as $storage) { $cache = $storage->getCache(); $ids = $cache->getAll(); diff --git a/tests/lib/Files/Cache/Wrapper/CacheJailTest.php b/tests/lib/Files/Cache/Wrapper/CacheJailTest.php index 365049c1cc..744e132d2c 100644 --- a/tests/lib/Files/Cache/Wrapper/CacheJailTest.php +++ b/tests/lib/Files/Cache/Wrapper/CacheJailTest.php @@ -24,7 +24,7 @@ class CacheJailTest extends CacheTest { */ protected $sourceCache; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->storage->mkdir('foo'); $this->sourceCache = $this->cache; diff --git a/tests/lib/Files/Cache/Wrapper/CachePermissionsMaskTest.php b/tests/lib/Files/Cache/Wrapper/CachePermissionsMaskTest.php index c12b35867f..0e2460f74e 100644 --- a/tests/lib/Files/Cache/Wrapper/CachePermissionsMaskTest.php +++ b/tests/lib/Files/Cache/Wrapper/CachePermissionsMaskTest.php @@ -24,7 +24,7 @@ class CachePermissionsMaskTest extends CacheTest { */ protected $sourceCache; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->storage->mkdir('foo'); $this->sourceCache = $this->cache; diff --git a/tests/lib/Files/Config/UserMountCacheTest.php b/tests/lib/Files/Config/UserMountCacheTest.php index 4bfc871095..ba1011aa68 100644 --- a/tests/lib/Files/Config/UserMountCacheTest.php +++ b/tests/lib/Files/Config/UserMountCacheTest.php @@ -42,7 +42,7 @@ class UserMountCacheTest extends TestCase { private $fileIds = []; - public function setUp() { + public function setUp(): void { $this->fileIds = []; $this->connection = \OC::$server->getDatabaseConnection(); $this->userManager = new Manager($this->createMock(IConfig::class), $this->createMock(EventDispatcherInterface::class)); @@ -54,7 +54,7 @@ class UserMountCacheTest extends TestCase { $this->cache = new \OC\Files\Config\UserMountCache($this->connection, $this->userManager, $this->createMock(Log::class)); } - public function tearDown() { + public function tearDown(): void { $builder = $this->connection->getQueryBuilder(); $builder->delete('mounts')->execute(); diff --git a/tests/lib/Files/EtagTest.php b/tests/lib/Files/EtagTest.php index ef7bf7cfbb..acda220d01 100644 --- a/tests/lib/Files/EtagTest.php +++ b/tests/lib/Files/EtagTest.php @@ -28,7 +28,7 @@ class EtagTest extends \Test\TestCase { */ private $userBackend; - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC_Hook::clear('OC_Filesystem', 'setup'); @@ -46,7 +46,7 @@ class EtagTest extends \Test\TestCase { \OC_User::useBackend($this->userBackend); } - protected function tearDown() { + protected function tearDown(): void { \OC::$server->getConfig()->setSystemValue('datadirectory', $this->datadir); $this->logout(); diff --git a/tests/lib/Files/FileInfoTest.php b/tests/lib/Files/FileInfoTest.php index b1ab880ad7..5c7c5cdc36 100644 --- a/tests/lib/Files/FileInfoTest.php +++ b/tests/lib/Files/FileInfoTest.php @@ -23,7 +23,7 @@ class FileInfoTest extends TestCase { private $config; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->createUser('foo', 'foo'); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); diff --git a/tests/lib/Files/FilesystemTest.php b/tests/lib/Files/FilesystemTest.php index 6fc6fbe9d7..6b6e3feda3 100644 --- a/tests/lib/Files/FilesystemTest.php +++ b/tests/lib/Files/FilesystemTest.php @@ -77,7 +77,7 @@ class FilesystemTest extends \Test\TestCase { return array('datadir' => $dir); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $userBackend = new \Test\Util\User\Dummy(); $userBackend->createUser(self::TEST_FILESYSTEM_USER1, self::TEST_FILESYSTEM_USER1); @@ -86,7 +86,7 @@ class FilesystemTest extends \Test\TestCase { $this->loginAsUser(); } - protected function tearDown() { + protected function tearDown(): void { foreach ($this->tmpDirs as $dir) { \OC_Helper::rmdirr($dir); } diff --git a/tests/lib/Files/Mount/ManagerTest.php b/tests/lib/Files/Mount/ManagerTest.php index 7633ffb2f2..f3cdc4264e 100644 --- a/tests/lib/Files/Mount/ManagerTest.php +++ b/tests/lib/Files/Mount/ManagerTest.php @@ -22,7 +22,7 @@ class ManagerTest extends \Test\TestCase { */ private $manager; - protected function setup() { + protected function setUp(): void { parent::setUp(); $this->manager = new \OC\Files\Mount\Manager(); } diff --git a/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php b/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php index 9aa0143b4a..5cd517df3c 100644 --- a/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php +++ b/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php @@ -21,7 +21,7 @@ class ObjectHomeMountProviderTest extends \Test\TestCase { /** @var IStorageFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $loader; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Files/Node/HookConnectorTest.php b/tests/lib/Files/Node/HookConnectorTest.php index 5180dbb9fe..9c47df02f3 100644 --- a/tests/lib/Files/Node/HookConnectorTest.php +++ b/tests/lib/Files/Node/HookConnectorTest.php @@ -53,7 +53,7 @@ class HookConnectorTest extends TestCase { */ private $userId; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userId = $this->getUniqueID(); $this->createUser($this->userId, 'pass'); @@ -71,7 +71,7 @@ class HookConnectorTest extends TestCase { $this->eventDispatcher = \OC::$server->getEventDispatcher(); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); \OC_Hook::clear('OC_Filesystem'); \OC_Util::tearDownFS(); diff --git a/tests/lib/Files/Node/IntegrationTest.php b/tests/lib/Files/Node/IntegrationTest.php index 6d9b0ce20b..2a542a1097 100644 --- a/tests/lib/Files/Node/IntegrationTest.php +++ b/tests/lib/Files/Node/IntegrationTest.php @@ -38,7 +38,7 @@ class IntegrationTest extends \Test\TestCase { */ private $view; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $manager = \OC\Files\Filesystem::getMountManager(); @@ -65,7 +65,7 @@ class IntegrationTest extends \Test\TestCase { $this->root->mount($subStorage, '/substorage/'); } - protected function tearDown() { + protected function tearDown(): void { foreach ($this->storages as $storage) { $storage->getCache()->clear(); } diff --git a/tests/lib/Files/Node/NodeTest.php b/tests/lib/Files/Node/NodeTest.php index 566c84e2c8..14ae0b0ead 100644 --- a/tests/lib/Files/Node/NodeTest.php +++ b/tests/lib/Files/Node/NodeTest.php @@ -43,7 +43,7 @@ abstract class NodeTest extends \Test\TestCase { /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ protected $userManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->user = $this->createMock(IUser::class); diff --git a/tests/lib/Files/Node/RootTest.php b/tests/lib/Files/Node/RootTest.php index 8a6e5411f2..70ffe1b25c 100644 --- a/tests/lib/Files/Node/RootTest.php +++ b/tests/lib/Files/Node/RootTest.php @@ -36,7 +36,7 @@ class RootTest extends \Test\TestCase { /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ private $userManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->user = $this->createMock(IUser::class); diff --git a/tests/lib/Files/ObjectStore/NoopScannerTest.php b/tests/lib/Files/ObjectStore/NoopScannerTest.php index 1832ed8d61..8b879e8ab3 100644 --- a/tests/lib/Files/ObjectStore/NoopScannerTest.php +++ b/tests/lib/Files/ObjectStore/NoopScannerTest.php @@ -19,7 +19,7 @@ class NoopScannerTest extends \Test\TestCase { /** @var \OC\Files\ObjectStore\NoopScanner $scanner */ private $scanner; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->storage = new \OC\Files\Storage\Temporary(array()); diff --git a/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php b/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php index ce9c9d2cd6..b8c7b15e03 100644 --- a/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php +++ b/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php @@ -38,7 +38,7 @@ class ObjectStoreStorageTest extends Storage { */ private $objectStorage; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $baseStorage = new Temporary(); @@ -47,7 +47,7 @@ class ObjectStoreStorageTest extends Storage { $this->instance = new ObjectStoreStorageOverwrite($config); } - protected function tearDown() { + protected function tearDown(): void { if (is_null($this->instance)) { return; } diff --git a/tests/lib/Files/PathVerificationTest.php b/tests/lib/Files/PathVerificationTest.php index 7e0b7dd265..02ea3df6cb 100644 --- a/tests/lib/Files/PathVerificationTest.php +++ b/tests/lib/Files/PathVerificationTest.php @@ -25,7 +25,7 @@ class PathVerificationTest extends \Test\TestCase { */ private $view; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->view = new View(); } diff --git a/tests/lib/Files/SimpleFS/SimpleFileTest.php b/tests/lib/Files/SimpleFS/SimpleFileTest.php index b31fa348af..ba8688fea0 100644 --- a/tests/lib/Files/SimpleFS/SimpleFileTest.php +++ b/tests/lib/Files/SimpleFS/SimpleFileTest.php @@ -36,7 +36,7 @@ class SimpleFileTest extends \Test\TestCase { /** @var SimpleFile */ private $simpleFile; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->file = $this->createMock(File::class); diff --git a/tests/lib/Files/SimpleFS/SimpleFolderTest.php b/tests/lib/Files/SimpleFS/SimpleFolderTest.php index 551d8c9520..9c55367f44 100644 --- a/tests/lib/Files/SimpleFS/SimpleFolderTest.php +++ b/tests/lib/Files/SimpleFS/SimpleFolderTest.php @@ -37,7 +37,7 @@ class SimpleFolderTest extends \Test\TestCase { /** @var SimpleFolder */ private $simpleFolder; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->folder = $this->createMock(Folder::class); diff --git a/tests/lib/Files/Storage/CommonTest.php b/tests/lib/Files/Storage/CommonTest.php index f7be996e5e..0900765c51 100644 --- a/tests/lib/Files/Storage/CommonTest.php +++ b/tests/lib/Files/Storage/CommonTest.php @@ -39,14 +39,14 @@ class CommonTest extends Storage { */ private $tmpDir; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder(); $this->instance = new \OC\Files\Storage\CommonTest(['datadir' => $this->tmpDir]); } - protected function tearDown() { + protected function tearDown(): void { \OC_Helper::rmdirr($this->tmpDir); parent::tearDown(); } diff --git a/tests/lib/Files/Storage/CopyDirectoryTest.php b/tests/lib/Files/Storage/CopyDirectoryTest.php index 034ffb5a53..d56cc37124 100644 --- a/tests/lib/Files/Storage/CopyDirectoryTest.php +++ b/tests/lib/Files/Storage/CopyDirectoryTest.php @@ -45,7 +45,7 @@ class CopyDirectoryStorage extends StorageNoRecursiveCopy { */ class CopyDirectoryTest extends Storage { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->instance = new CopyDirectoryStorage([]); } diff --git a/tests/lib/Files/Storage/HomeTest.php b/tests/lib/Files/Storage/HomeTest.php index e6899ff7d3..6075e9af29 100644 --- a/tests/lib/Files/Storage/HomeTest.php +++ b/tests/lib/Files/Storage/HomeTest.php @@ -67,7 +67,7 @@ class HomeTest extends Storage { */ private $user; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder(); @@ -76,7 +76,7 @@ class HomeTest extends Storage { $this->instance = new \OC\Files\Storage\Home(array('user' => $this->user)); } - protected function tearDown() { + protected function tearDown(): void { \OC_Helper::rmdirr($this->tmpDir); parent::tearDown(); } diff --git a/tests/lib/Files/Storage/LocalTest.php b/tests/lib/Files/Storage/LocalTest.php index c611a99023..3b83a349cf 100644 --- a/tests/lib/Files/Storage/LocalTest.php +++ b/tests/lib/Files/Storage/LocalTest.php @@ -35,14 +35,14 @@ class LocalTest extends Storage { */ private $tmpDir; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder(); $this->instance = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir)); } - protected function tearDown() { + protected function tearDown(): void { \OC_Helper::rmdirr($this->tmpDir); parent::tearDown(); } diff --git a/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php b/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php index 1672d17e36..e8eb49ec01 100644 --- a/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php +++ b/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php @@ -35,7 +35,7 @@ class AvailabilityTest extends \Test\TestCase { /** @var Availability */ protected $wrapper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->storageCache = $this->createMock(StorageCache::class); diff --git a/tests/lib/Files/Storage/Wrapper/EncodingTest.php b/tests/lib/Files/Storage/Wrapper/EncodingTest.php index 24bf10eb78..5b4443eecf 100644 --- a/tests/lib/Files/Storage/Wrapper/EncodingTest.php +++ b/tests/lib/Files/Storage/Wrapper/EncodingTest.php @@ -18,7 +18,7 @@ class EncodingTest extends \Test\Files\Storage\Storage { */ private $sourceStorage; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->sourceStorage = new \OC\Files\Storage\Temporary([]); $this->instance = new \OC\Files\Storage\Wrapper\Encoding([ @@ -26,7 +26,7 @@ class EncodingTest extends \Test\Files\Storage\Storage { ]); } - public function tearDown() { + public function tearDown(): void { $this->sourceStorage->cleanUp(); parent::tearDown(); } diff --git a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php index 70d94ab16e..eb43eb7335 100644 --- a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php +++ b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php @@ -108,7 +108,7 @@ class EncryptionTest extends Storage { /** @var integer dummy unencrypted size */ private $dummySize = -1; - protected function setUp() { + protected function setUp(): void { parent::setUp(); diff --git a/tests/lib/Files/Storage/Wrapper/JailTest.php b/tests/lib/Files/Storage/Wrapper/JailTest.php index b03eb0bcc6..1091809f96 100644 --- a/tests/lib/Files/Storage/Wrapper/JailTest.php +++ b/tests/lib/Files/Storage/Wrapper/JailTest.php @@ -15,7 +15,7 @@ class JailTest extends \Test\Files\Storage\Storage { */ private $sourceStorage; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->sourceStorage = new \OC\Files\Storage\Temporary(array()); $this->sourceStorage->mkdir('foo'); @@ -25,7 +25,7 @@ class JailTest extends \Test\Files\Storage\Storage { )); } - public function tearDown() { + public function tearDown(): void { // test that nothing outside our jail is touched $contents = array(); $dh = $this->sourceStorage->opendir(''); diff --git a/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php b/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php index 388272b410..c9545ae3f2 100644 --- a/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php +++ b/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php @@ -22,13 +22,13 @@ class PermissionsMaskTest extends \Test\Files\Storage\Storage { */ private $sourceStorage; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->sourceStorage = new \OC\Files\Storage\Temporary(array()); $this->instance = $this->getMaskedStorage(Constants::PERMISSION_ALL); } - public function tearDown() { + public function tearDown(): void { $this->sourceStorage->cleanUp(); parent::tearDown(); } diff --git a/tests/lib/Files/Storage/Wrapper/QuotaTest.php b/tests/lib/Files/Storage/Wrapper/QuotaTest.php index 0b80467fcc..0061ca3910 100644 --- a/tests/lib/Files/Storage/Wrapper/QuotaTest.php +++ b/tests/lib/Files/Storage/Wrapper/QuotaTest.php @@ -27,7 +27,7 @@ class QuotaTest extends \Test\Files\Storage\Storage { */ private $tmpDir; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder(); @@ -35,7 +35,7 @@ class QuotaTest extends \Test\Files\Storage\Storage { $this->instance = new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => 10000000)); } - protected function tearDown() { + protected function tearDown(): void { \OC_Helper::rmdirr($this->tmpDir); parent::tearDown(); } diff --git a/tests/lib/Files/Storage/Wrapper/WrapperTest.php b/tests/lib/Files/Storage/Wrapper/WrapperTest.php index 942ff27fc3..2477b361bc 100644 --- a/tests/lib/Files/Storage/Wrapper/WrapperTest.php +++ b/tests/lib/Files/Storage/Wrapper/WrapperTest.php @@ -14,7 +14,7 @@ class WrapperTest extends \Test\Files\Storage\Storage { */ private $tmpDir; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder(); @@ -22,7 +22,7 @@ class WrapperTest extends \Test\Files\Storage\Storage { $this->instance = new \OC\Files\Storage\Wrapper\Wrapper(array('storage' => $storage)); } - protected function tearDown() { + protected function tearDown(): void { \OC_Helper::rmdirr($this->tmpDir); parent::tearDown(); } diff --git a/tests/lib/Files/Type/DetectionTest.php b/tests/lib/Files/Type/DetectionTest.php index 1d01a96fcc..c0cd2a2441 100644 --- a/tests/lib/Files/Type/DetectionTest.php +++ b/tests/lib/Files/Type/DetectionTest.php @@ -28,7 +28,7 @@ class DetectionTest extends \Test\TestCase { /** @var Detection */ private $detection; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->detection = new Detection( \OC::$server->getURLGenerator(), diff --git a/tests/lib/Files/Type/LoaderTest.php b/tests/lib/Files/Type/LoaderTest.php index cf6aa31a04..a99c80dac4 100644 --- a/tests/lib/Files/Type/LoaderTest.php +++ b/tests/lib/Files/Type/LoaderTest.php @@ -30,12 +30,12 @@ class LoaderTest extends \Test\TestCase { /** @var Loader */ protected $loader; - protected function setUp() { + protected function setUp(): void { $this->db = \OC::$server->getDatabaseConnection(); $this->loader = new Loader($this->db); } - protected function tearDown() { + protected function tearDown(): void { $deleteMimetypes = $this->db->getQueryBuilder(); $deleteMimetypes->delete('mimetypes') ->where($deleteMimetypes->expr()->like( diff --git a/tests/lib/Files/Utils/ScannerTest.php b/tests/lib/Files/Utils/ScannerTest.php index 8748b52f0c..9f057960b6 100644 --- a/tests/lib/Files/Utils/ScannerTest.php +++ b/tests/lib/Files/Utils/ScannerTest.php @@ -47,7 +47,7 @@ class ScannerTest extends \Test\TestCase { */ private $userBackend; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userBackend = new \Test\Util\User\Dummy(); @@ -55,7 +55,7 @@ class ScannerTest extends \Test\TestCase { $this->loginAsUser(); } - protected function tearDown() { + protected function tearDown(): void { $this->logout(); \OC::$server->getUserManager()->removeBackend($this->userBackend); parent::tearDown(); diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index c154c28e24..1e564c6909 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -85,7 +85,7 @@ class ViewTest extends \Test\TestCase { /** @var \OC\Files\Storage\Storage */ private $tempStorage; - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC_Hook::clear(); @@ -109,7 +109,7 @@ class ViewTest extends \Test\TestCase { $this->tempStorage = null; } - protected function tearDown() { + protected function tearDown(): void { \OC_User::setUserId($this->user); foreach ($this->storages as $storage) { $cache = $storage->getCache(); diff --git a/tests/lib/GlobalScale/ConfigTest.php b/tests/lib/GlobalScale/ConfigTest.php index ab5ef351fc..4ceb34dc02 100644 --- a/tests/lib/GlobalScale/ConfigTest.php +++ b/tests/lib/GlobalScale/ConfigTest.php @@ -31,7 +31,7 @@ class ConfigTest extends TestCase { /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ private $config; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Group/DatabaseTest.php b/tests/lib/Group/DatabaseTest.php index 395a442c5e..4af8b1cd43 100644 --- a/tests/lib/Group/DatabaseTest.php +++ b/tests/lib/Group/DatabaseTest.php @@ -45,12 +45,12 @@ class DatabaseTest extends Backend { return $name; } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->backend = new \OC\Group\Database(); } - protected function tearDown() { + protected function tearDown(): void { foreach ($this->groups as $group) { $this->backend->deleteGroup($group); } diff --git a/tests/lib/Group/Dummy.php b/tests/lib/Group/Dummy.php index 5504cd63a0..3be0415993 100644 --- a/tests/lib/Group/Dummy.php +++ b/tests/lib/Group/Dummy.php @@ -28,7 +28,7 @@ namespace Test\Group; * @group DB */ class Dummy extends Backend { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->backend=new \Test\Util\Group\Dummy(); } diff --git a/tests/lib/Group/GroupTest.php b/tests/lib/Group/GroupTest.php index 5ab7a64508..1a240d5bc9 100644 --- a/tests/lib/Group/GroupTest.php +++ b/tests/lib/Group/GroupTest.php @@ -21,7 +21,7 @@ class GroupTest extends \Test\TestCase { /** @var EventDispatcherInterface|MockObject */ protected $dispatcher; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->dispatcher = $this->createMock(EventDispatcherInterface::class); } diff --git a/tests/lib/Group/ManagerTest.php b/tests/lib/Group/ManagerTest.php index 3069f9d148..86665ee087 100644 --- a/tests/lib/Group/ManagerTest.php +++ b/tests/lib/Group/ManagerTest.php @@ -40,7 +40,7 @@ class ManagerTest extends TestCase { /** @var ILogger|MockObject */ protected $logger; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(Manager::class); diff --git a/tests/lib/Group/MetaDataTest.php b/tests/lib/Group/MetaDataTest.php index c24155aef3..c53a7eb2ad 100644 --- a/tests/lib/Group/MetaDataTest.php +++ b/tests/lib/Group/MetaDataTest.php @@ -34,7 +34,7 @@ class MetaDataTest extends \Test\TestCase { /** @var bool */ private $isAdmin = true; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->groupManager = $this->getMockBuilder('\OC\Group\Manager') ->disableOriginalConstructor() diff --git a/tests/lib/HelperStorageTest.php b/tests/lib/HelperStorageTest.php index dacd73a4f0..7b2fb66573 100644 --- a/tests/lib/HelperStorageTest.php +++ b/tests/lib/HelperStorageTest.php @@ -22,7 +22,7 @@ class HelperStorageTest extends \Test\TestCase { /** @var \OC\Files\Storage\Storage */ private $storage; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->user = $this->getUniqueID('user_'); @@ -38,7 +38,7 @@ class HelperStorageTest extends \Test\TestCase { $this->storageMock = null; } - protected function tearDown() { + protected function tearDown(): void { $this->user = null; if ($this->storageMock) { diff --git a/tests/lib/Hooks/BasicEmitterTest.php b/tests/lib/Hooks/BasicEmitterTest.php index 7b71bb8259..948659faab 100644 --- a/tests/lib/Hooks/BasicEmitterTest.php +++ b/tests/lib/Hooks/BasicEmitterTest.php @@ -37,7 +37,7 @@ class BasicEmitterTest extends \Test\TestCase { */ protected $emitter; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->emitter = new DummyEmitter(); } diff --git a/tests/lib/Hooks/LegacyEmitterTest.php b/tests/lib/Hooks/LegacyEmitterTest.php index 60a29f2324..32c923d801 100644 --- a/tests/lib/Hooks/LegacyEmitterTest.php +++ b/tests/lib/Hooks/LegacyEmitterTest.php @@ -26,7 +26,7 @@ class LegacyEmitterTest extends BasicEmitterTest { //we can't use exceptions here since OC_Hooks catches all exceptions private static $emitted = false; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->emitter = new DummyLegacyEmitter(); diff --git a/tests/lib/Http/Client/ClientTest.php b/tests/lib/Http/Client/ClientTest.php index 5c0693732b..0f91769d25 100644 --- a/tests/lib/Http/Client/ClientTest.php +++ b/tests/lib/Http/Client/ClientTest.php @@ -29,7 +29,7 @@ class ClientTest extends \Test\TestCase { /** @var array */ private $defaultRequestOptions; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); $this->guzzleClient = $this->getMockBuilder(\GuzzleHttp\Client::class) diff --git a/tests/lib/Http/Client/ResponseTest.php b/tests/lib/Http/Client/ResponseTest.php index f62563a95e..9707e955bc 100644 --- a/tests/lib/Http/Client/ResponseTest.php +++ b/tests/lib/Http/Client/ResponseTest.php @@ -19,7 +19,7 @@ class ResponseTest extends \Test\TestCase { /** @var GuzzleResponse */ private $guzzleResponse; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->guzzleResponse = new GuzzleResponse(1337); } diff --git a/tests/lib/ImageTest.php b/tests/lib/ImageTest.php index 8f37d9814f..34fcf0e004 100644 --- a/tests/lib/ImageTest.php +++ b/tests/lib/ImageTest.php @@ -12,7 +12,7 @@ use OC; use OCP\IConfig; class ImageTest extends \Test\TestCase { - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { @unlink(OC::$SERVERROOT.'/tests/data/testimage2.png'); @unlink(OC::$SERVERROOT.'/tests/data/testimage2.jpg'); diff --git a/tests/lib/InitialStateServiceTest.php b/tests/lib/InitialStateServiceTest.php index 08bff615e3..2a97f07ac2 100644 --- a/tests/lib/InitialStateServiceTest.php +++ b/tests/lib/InitialStateServiceTest.php @@ -36,7 +36,7 @@ class InitialStateServiceTest extends TestCase { /** @var InitialStateService */ private $service; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->service = new InitialStateService( diff --git a/tests/lib/InstallerTest.php b/tests/lib/InstallerTest.php index 9fb813aaac..509dfdb66a 100644 --- a/tests/lib/InstallerTest.php +++ b/tests/lib/InstallerTest.php @@ -40,7 +40,7 @@ class InstallerTest extends TestCase { /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->appFetcher = $this->createMock(AppFetcher::class); @@ -72,7 +72,7 @@ class InstallerTest extends TestCase { ); } - protected function tearDown() { + protected function tearDown(): void { $installer = new Installer( \OC::$server->getAppFetcher(), \OC::$server->getHTTPClientService(), diff --git a/tests/lib/IntegrityCheck/CheckerTest.php b/tests/lib/IntegrityCheck/CheckerTest.php index febd9f5662..e7553aeac1 100644 --- a/tests/lib/IntegrityCheck/CheckerTest.php +++ b/tests/lib/IntegrityCheck/CheckerTest.php @@ -51,7 +51,7 @@ class CheckerTest extends TestCase { /** @var \OC\Files\Type\Detection|\PHPUnit_Framework_MockObject_MockObject */ private $mimeTypeDetector; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->environmentHelper = $this->createMock(EnvironmentHelper::class); $this->fileAccessHelper = $this->createMock(FileAccessHelper::class); diff --git a/tests/lib/IntegrityCheck/Helpers/AppLocatorTest.php b/tests/lib/IntegrityCheck/Helpers/AppLocatorTest.php index d0083298b2..333b29f826 100644 --- a/tests/lib/IntegrityCheck/Helpers/AppLocatorTest.php +++ b/tests/lib/IntegrityCheck/Helpers/AppLocatorTest.php @@ -28,7 +28,7 @@ class AppLocatorTest extends TestCase { /** @var AppLocator */ private $locator; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->locator = new AppLocator(); } diff --git a/tests/lib/IntegrityCheck/Helpers/EnvironmentHelperTest.php b/tests/lib/IntegrityCheck/Helpers/EnvironmentHelperTest.php index 9dc9214a77..079baaafe9 100644 --- a/tests/lib/IntegrityCheck/Helpers/EnvironmentHelperTest.php +++ b/tests/lib/IntegrityCheck/Helpers/EnvironmentHelperTest.php @@ -28,9 +28,9 @@ class EnvironmentHelperTest extends TestCase { /** @var EnvironmentHelper */ private $environmentHelper; - public function setUp() { + public function setUp(): void { $this->environmentHelper = new EnvironmentHelper(); - return parent::setUp(); + parent::setUp(); } public function testGetServerRoot() { diff --git a/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php b/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php index f2ac46555f..87c064a845 100644 --- a/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php +++ b/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php @@ -28,7 +28,7 @@ class FileAccessHelperTest extends TestCase { /** @var FileAccessHelper */ private $fileAccessHelper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->fileAccessHelper = new FileAccessHelper(); } diff --git a/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php b/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php index 735a5e2d19..081d2b5cb0 100644 --- a/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php +++ b/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php @@ -28,7 +28,7 @@ class ExcludeFileByNameFilterIteratorTest extends TestCase { /** @var ExcludeFileByNameFilterIterator|\PHPUnit\Framework\MockObject\MockObject */ protected $filter; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->filter = $this->getMockBuilder(ExcludeFileByNameFilterIterator::class) ->disableOriginalConstructor() diff --git a/tests/lib/L10N/FactoryTest.php b/tests/lib/L10N/FactoryTest.php index 6b9bd05356..9235542b19 100644 --- a/tests/lib/L10N/FactoryTest.php +++ b/tests/lib/L10N/FactoryTest.php @@ -36,7 +36,7 @@ class FactoryTest extends TestCase { /** @var string */ protected $serverRoot; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class) diff --git a/tests/lib/L10N/LanguageIteratorTest.php b/tests/lib/L10N/LanguageIteratorTest.php index c8b1b24685..f0ba1bc0ae 100644 --- a/tests/lib/L10N/LanguageIteratorTest.php +++ b/tests/lib/L10N/LanguageIteratorTest.php @@ -36,7 +36,7 @@ class LanguageIteratorTest extends TestCase { /** @var LanguageIterator */ protected $iterator; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->createMock(IUser::class); diff --git a/tests/lib/LargeFileHelperGetFileSizeTest.php b/tests/lib/LargeFileHelperGetFileSizeTest.php index b2735d7f61..f9c90cced5 100644 --- a/tests/lib/LargeFileHelperGetFileSizeTest.php +++ b/tests/lib/LargeFileHelperGetFileSizeTest.php @@ -20,7 +20,7 @@ class LargeFileHelperGetFileSizeTest extends TestCase { /** @var \OC\LargeFileHelper */ protected $helper; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->helper = new \OC\LargeFileHelper(); } diff --git a/tests/lib/LargeFileHelperTest.php b/tests/lib/LargeFileHelperTest.php index 7d155ff8b4..bfe2624691 100644 --- a/tests/lib/LargeFileHelperTest.php +++ b/tests/lib/LargeFileHelperTest.php @@ -11,7 +11,7 @@ namespace Test; class LargeFileHelperTest extends TestCase { protected $helper; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->helper = new \OC\LargeFileHelper; } diff --git a/tests/lib/LegacyHelperTest.php b/tests/lib/LegacyHelperTest.php index 96cd190fd6..b86c489367 100644 --- a/tests/lib/LegacyHelperTest.php +++ b/tests/lib/LegacyHelperTest.php @@ -15,11 +15,11 @@ class LegacyHelperTest extends \Test\TestCase { /** @var string */ private $originalWebRoot; - public function setUp() { + public function setUp(): void { $this->originalWebRoot = \OC::$WEBROOT; } - public function tearDown() { + public function tearDown(): void { // Reset webRoot \OC::$WEBROOT = $this->originalWebRoot; } diff --git a/tests/lib/Lock/DBLockingProviderTest.php b/tests/lib/Lock/DBLockingProviderTest.php index e8419815e3..b7929aee47 100644 --- a/tests/lib/Lock/DBLockingProviderTest.php +++ b/tests/lib/Lock/DBLockingProviderTest.php @@ -49,7 +49,7 @@ class DBLockingProviderTest extends LockingProvider { protected $currentTime; - public function setUp() { + public function setUp(): void { $this->currentTime = time(); $this->timeFactory = $this->createMock(ITimeFactory::class); $this->timeFactory->expects($this->any()) @@ -68,7 +68,7 @@ class DBLockingProviderTest extends LockingProvider { return new \OC\Lock\DBLockingProvider($this->connection, \OC::$server->getLogger(), $this->timeFactory, 3600); } - public function tearDown() { + public function tearDown(): void { $this->connection->executeQuery('DELETE FROM `*PREFIX*file_locks`'); parent::tearDown(); } diff --git a/tests/lib/Lock/LockingProvider.php b/tests/lib/Lock/LockingProvider.php index 9c0461e2e6..7faca3ea90 100644 --- a/tests/lib/Lock/LockingProvider.php +++ b/tests/lib/Lock/LockingProvider.php @@ -36,7 +36,7 @@ abstract class LockingProvider extends TestCase { */ abstract protected function getInstance(); - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->instance = $this->getInstance(); } diff --git a/tests/lib/Lock/MemcacheLockingProviderTest.php b/tests/lib/Lock/MemcacheLockingProviderTest.php index baf99dbb2b..6d37aaa536 100644 --- a/tests/lib/Lock/MemcacheLockingProviderTest.php +++ b/tests/lib/Lock/MemcacheLockingProviderTest.php @@ -38,7 +38,7 @@ class MemcacheLockingProviderTest extends LockingProvider { return new \OC\Lock\MemcacheLockingProvider($this->memcache); } - public function tearDown() { + public function tearDown(): void { $this->memcache->clear(); parent::tearDown(); } diff --git a/tests/lib/Lockdown/Filesystem/NoFSTest.php b/tests/lib/Lockdown/Filesystem/NoFSTest.php index a0900ad769..eaaa7b1295 100644 --- a/tests/lib/Lockdown/Filesystem/NoFSTest.php +++ b/tests/lib/Lockdown/Filesystem/NoFSTest.php @@ -34,16 +34,16 @@ use Test\Traits\UserTrait; class NoFSTest extends \Test\TestCase { use UserTrait; - public function tearDown() { + public function tearDown(): void { $token = new DefaultToken(); $token->setScope([ 'filesystem' => true ]); \OC::$server->getLockdownManager()->setToken($token); - return parent::tearDown(); + parent::tearDown(); } - public function setUp() { + public function setUp(): void { parent::setUp(); $token = new DefaultToken(); $token->setScope([ diff --git a/tests/lib/Lockdown/Filesystem/NullCacheTest.php b/tests/lib/Lockdown/Filesystem/NullCacheTest.php index 7773241fca..f9c6fb3ff6 100644 --- a/tests/lib/Lockdown/Filesystem/NullCacheTest.php +++ b/tests/lib/Lockdown/Filesystem/NullCacheTest.php @@ -34,7 +34,7 @@ class NulLCacheTest extends \Test\TestCase { /** @var NullCache */ private $cache; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->cache = new NullCache(); diff --git a/tests/lib/Lockdown/Filesystem/NullStorageTest.php b/tests/lib/Lockdown/Filesystem/NullStorageTest.php index a8e2d8d6ba..97a5b775d0 100644 --- a/tests/lib/Lockdown/Filesystem/NullStorageTest.php +++ b/tests/lib/Lockdown/Filesystem/NullStorageTest.php @@ -36,7 +36,7 @@ class NullStorageTest extends TestCase { /** @var NullStorage */ private $storage; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->storage = new NullStorage([]); diff --git a/tests/lib/Lockdown/LockdownManagerTest.php b/tests/lib/Lockdown/LockdownManagerTest.php index 1d206dbf40..2f1c794d4d 100644 --- a/tests/lib/Lockdown/LockdownManagerTest.php +++ b/tests/lib/Lockdown/LockdownManagerTest.php @@ -29,7 +29,7 @@ use Test\TestCase; class LockdownManagerTest extends TestCase { private $sessionCallback; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->sessionCallback = function() { diff --git a/tests/lib/Log/FileTest.php b/tests/lib/Log/FileTest.php index c2c3a4ff68..0bbcdc0a23 100644 --- a/tests/lib/Log/FileTest.php +++ b/tests/lib/Log/FileTest.php @@ -32,7 +32,7 @@ class FileTest extends TestCase /** @var File */ protected $logFile; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = \OC::$server->getSystemConfig(); $this->restore_logfile = $config->getValue("logfile"); @@ -41,7 +41,7 @@ class FileTest extends TestCase $config->setValue("logfile", $config->getValue('datadirectory') . "/logtest.log"); $this->logFile = new File($config->getValue('datadirectory') . '/logtest.log', '', $config); } - protected function tearDown() { + protected function tearDown(): void { $config = \OC::$server->getSystemConfig(); if (isset($this->restore_logfile)) { $config->getValue("logfile", $this->restore_logfile); diff --git a/tests/lib/Log/LogFactoryTest.php b/tests/lib/Log/LogFactoryTest.php index ea6b12436e..37dbf1d97b 100644 --- a/tests/lib/Log/LogFactoryTest.php +++ b/tests/lib/Log/LogFactoryTest.php @@ -48,7 +48,7 @@ class LogFactoryTest extends TestCase { /** @var SystemConfig|\PHPUnit_Framework_MockObject_MockObject */ protected $systemConfig; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->c = $this->createMock(IServerContainer::class); diff --git a/tests/lib/LoggerTest.php b/tests/lib/LoggerTest.php index 83cb87b873..f22896e987 100644 --- a/tests/lib/LoggerTest.php +++ b/tests/lib/LoggerTest.php @@ -26,7 +26,7 @@ class LoggerTest extends TestCase implements IWriter { /** @var array */ private $logs = []; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->logs = []; diff --git a/tests/lib/Mail/EMailTemplateTest.php b/tests/lib/Mail/EMailTemplateTest.php index d4687c44b0..60d7d2bbbf 100644 --- a/tests/lib/Mail/EMailTemplateTest.php +++ b/tests/lib/Mail/EMailTemplateTest.php @@ -39,7 +39,7 @@ class EMailTemplateTest extends TestCase { /** @var EMailTemplate */ private $emailTemplate; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->defaults = $this->createMock(Defaults::class); diff --git a/tests/lib/Mail/MailerTest.php b/tests/lib/Mail/MailerTest.php index 1913cc1176..911e570829 100644 --- a/tests/lib/Mail/MailerTest.php +++ b/tests/lib/Mail/MailerTest.php @@ -31,7 +31,7 @@ class MailerTest extends TestCase { /** @var Mailer */ private $mailer; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Mail/MessageTest.php b/tests/lib/Mail/MessageTest.php index 4b656938e4..729178d328 100644 --- a/tests/lib/Mail/MessageTest.php +++ b/tests/lib/Mail/MessageTest.php @@ -31,7 +31,7 @@ class MessageTest extends TestCase { ); } - public function setUp() { + public function setUp(): void { parent::setUp(); $this->swiftMessage = $this->getMockBuilder('\Swift_Message') diff --git a/tests/lib/Memcache/APCuTest.php b/tests/lib/Memcache/APCuTest.php index 41de75a8ea..199acbe263 100644 --- a/tests/lib/Memcache/APCuTest.php +++ b/tests/lib/Memcache/APCuTest.php @@ -10,7 +10,7 @@ namespace Test\Memcache; class APCuTest extends Cache { - protected function setUp() { + protected function setUp(): void { parent::setUp(); if(!\OC\Memcache\APCu::isAvailable()) { diff --git a/tests/lib/Memcache/ArrayCacheTest.php b/tests/lib/Memcache/ArrayCacheTest.php index 3ae8c116a0..4e3623d344 100644 --- a/tests/lib/Memcache/ArrayCacheTest.php +++ b/tests/lib/Memcache/ArrayCacheTest.php @@ -10,7 +10,7 @@ namespace Test\Memcache; class ArrayCacheTest extends Cache { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->instance = new \OC\Memcache\ArrayCache(''); } diff --git a/tests/lib/Memcache/Cache.php b/tests/lib/Memcache/Cache.php index 8d6a231dd8..ab316738c9 100644 --- a/tests/lib/Memcache/Cache.php +++ b/tests/lib/Memcache/Cache.php @@ -123,7 +123,7 @@ abstract class Cache extends \Test\Cache\TestCache { } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->clear(); } diff --git a/tests/lib/Memcache/MemcachedTest.php b/tests/lib/Memcache/MemcachedTest.php index 865d8594bb..96b8899266 100644 --- a/tests/lib/Memcache/MemcachedTest.php +++ b/tests/lib/Memcache/MemcachedTest.php @@ -10,7 +10,7 @@ namespace Test\Memcache; class MemcachedTest extends Cache { - static public function setUpBeforeClass() { + static public function setUpBeforeClass(): void { parent::setUpBeforeClass(); if (!\OC\Memcache\Memcached::isAvailable()) { @@ -22,7 +22,7 @@ class MemcachedTest extends Cache { } } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->instance = new \OC\Memcache\Memcached($this->getUniqueID()); } diff --git a/tests/lib/Memcache/RedisTest.php b/tests/lib/Memcache/RedisTest.php index 6a0a82f6aa..ba16b4a2bf 100644 --- a/tests/lib/Memcache/RedisTest.php +++ b/tests/lib/Memcache/RedisTest.php @@ -10,7 +10,7 @@ namespace Test\Memcache; class RedisTest extends Cache { - static public function setUpBeforeClass() { + static public function setUpBeforeClass(): void { parent::setUpBeforeClass(); if (!\OC\Memcache\Redis::isAvailable()) { @@ -44,7 +44,7 @@ class RedisTest extends Cache { } } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->instance = new \OC\Memcache\Redis($this->getUniqueID()); } diff --git a/tests/lib/Migration/BackgroundRepairTest.php b/tests/lib/Migration/BackgroundRepairTest.php index df81fd4577..3b94c22fd5 100644 --- a/tests/lib/Migration/BackgroundRepairTest.php +++ b/tests/lib/Migration/BackgroundRepairTest.php @@ -68,7 +68,7 @@ class BackgroundRepairTest extends TestCase { /** @var EventDispatcherInterface|\PHPUnit_Framework_MockObject_MockObject $dispatcher */ private $dispatcher; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->jobList = $this->getMockBuilder('OC\BackgroundJob\JobList') diff --git a/tests/lib/NavigationManagerTest.php b/tests/lib/NavigationManagerTest.php index acf0808878..74cb3948c5 100644 --- a/tests/lib/NavigationManagerTest.php +++ b/tests/lib/NavigationManagerTest.php @@ -41,7 +41,7 @@ class NavigationManagerTest extends TestCase { /** @var \OC\NavigationManager */ protected $navigationManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->appManager = $this->createMock(AppManager::class); diff --git a/tests/lib/Notification/ActionTest.php b/tests/lib/Notification/ActionTest.php index 9160ea7a7c..5103babd0e 100644 --- a/tests/lib/Notification/ActionTest.php +++ b/tests/lib/Notification/ActionTest.php @@ -30,7 +30,7 @@ class ActionTest extends TestCase { /** @var IAction */ protected $action; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->action = new Action(); } diff --git a/tests/lib/Notification/ManagerTest.php b/tests/lib/Notification/ManagerTest.php index 259ac0beef..5de0b57260 100644 --- a/tests/lib/Notification/ManagerTest.php +++ b/tests/lib/Notification/ManagerTest.php @@ -40,7 +40,7 @@ class ManagerTest extends TestCase { /** @var ILogger|MockObject */ protected $logger; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->validator = $this->createMock(IValidator::class); $this->logger = $this->createMock(ILogger::class); diff --git a/tests/lib/Notification/NotificationTest.php b/tests/lib/Notification/NotificationTest.php index d72c9f62ae..6b021ceb6d 100644 --- a/tests/lib/Notification/NotificationTest.php +++ b/tests/lib/Notification/NotificationTest.php @@ -35,7 +35,7 @@ class NotificationTest extends TestCase { /** @var IValidator|\PHPUnit_Framework_MockObject_MockObject */ protected $validator; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->validator = $this->createMock(IValidator::class); $this->notification = new Notification($this->validator); diff --git a/tests/lib/OCS/DiscoveryServiceTest.php b/tests/lib/OCS/DiscoveryServiceTest.php index f8ec68f6f5..cbdde7bc31 100644 --- a/tests/lib/OCS/DiscoveryServiceTest.php +++ b/tests/lib/OCS/DiscoveryServiceTest.php @@ -39,7 +39,7 @@ class DiscoveryServiceTest extends TestCase { /** @var IDiscoveryService */ private $discoveryService; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->cacheFactory = $this->getMockBuilder(ICacheFactory::class)->getMock(); diff --git a/tests/lib/OCS/ProviderTest.php b/tests/lib/OCS/ProviderTest.php index 9444544d12..4f962f7f79 100644 --- a/tests/lib/OCS/ProviderTest.php +++ b/tests/lib/OCS/ProviderTest.php @@ -31,7 +31,7 @@ class ProviderTest extends \Test\TestCase { /** @var Provider */ private $ocsProvider; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder('\\OCP\\IRequest')->getMock(); diff --git a/tests/lib/Preview/BackgroundCleanupJobTest.php b/tests/lib/Preview/BackgroundCleanupJobTest.php index b33d75c6aa..65e30df4a1 100644 --- a/tests/lib/Preview/BackgroundCleanupJobTest.php +++ b/tests/lib/Preview/BackgroundCleanupJobTest.php @@ -61,7 +61,7 @@ class BackgroundCleanupJobTest extends \Test\TestCase { /** @var IRootFolder */ private $rootFolder; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userId = $this->getUniqueID(); @@ -87,7 +87,7 @@ class BackgroundCleanupJobTest extends \Test\TestCase { $this->rootFolder = \OC::$server->getRootFolder(); } - public function tearDown() { + public function tearDown(): void { if ($this->trashEnabled) { $appManager = \OC::$server->getAppManager(); $appManager->enableApp('files_trashbin'); @@ -95,7 +95,7 @@ class BackgroundCleanupJobTest extends \Test\TestCase { $this->logout(); - return parent::tearDown(); + parent::tearDown(); } private function setup11Previews(): array { diff --git a/tests/lib/Preview/BitmapTest.php b/tests/lib/Preview/BitmapTest.php index 32d6ce896e..63f9c6a013 100644 --- a/tests/lib/Preview/BitmapTest.php +++ b/tests/lib/Preview/BitmapTest.php @@ -30,7 +30,7 @@ namespace Test\Preview; */ class BitmapTest extends Provider { - public function setUp() { + public function setUp(): void { parent::setUp(); $fileName = 'testimage.eps'; diff --git a/tests/lib/Preview/GeneratorTest.php b/tests/lib/Preview/GeneratorTest.php index c7fe1ea5f8..167f6aba1b 100644 --- a/tests/lib/Preview/GeneratorTest.php +++ b/tests/lib/Preview/GeneratorTest.php @@ -58,7 +58,7 @@ class GeneratorTest extends \Test\TestCase { /** @var Generator */ private $generator; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Preview/HEICTest.php b/tests/lib/Preview/HEICTest.php index a3cc37d24f..2b4c63098b 100644 --- a/tests/lib/Preview/HEICTest.php +++ b/tests/lib/Preview/HEICTest.php @@ -30,7 +30,7 @@ namespace Test\Preview; */ class HEICTest extends Provider { - public function setUp() { + public function setUp(): void { if ( !in_array("HEIC", \Imagick::queryFormats("HEI*")) ) { $this->markTestSkipped('ImageMagick is not HEIC aware. Skipping tests'); } else { diff --git a/tests/lib/Preview/ImageTest.php b/tests/lib/Preview/ImageTest.php index a55433a268..200deef386 100644 --- a/tests/lib/Preview/ImageTest.php +++ b/tests/lib/Preview/ImageTest.php @@ -30,7 +30,7 @@ namespace Test\Preview; */ class ImageTest extends Provider { - public function setUp() { + public function setUp(): void { parent::setUp(); $fileName = 'testimage.jpg'; diff --git a/tests/lib/Preview/MP3Test.php b/tests/lib/Preview/MP3Test.php index 576eea20b8..5e0764a8ed 100644 --- a/tests/lib/Preview/MP3Test.php +++ b/tests/lib/Preview/MP3Test.php @@ -30,7 +30,7 @@ namespace Test\Preview; */ class MP3Test extends Provider { - public function setUp() { + public function setUp(): void { parent::setUp(); $fileName = 'testimage.mp3'; diff --git a/tests/lib/Preview/MovieTest.php b/tests/lib/Preview/MovieTest.php index 0c174a40ca..7437ff3567 100644 --- a/tests/lib/Preview/MovieTest.php +++ b/tests/lib/Preview/MovieTest.php @@ -30,7 +30,7 @@ namespace Test\Preview; */ class MovieTest extends Provider { - public function setUp() { + public function setUp(): void { $avconvBinary = \OC_Helper::findBinaryPath('avconv'); $ffmpegBinary = ($avconvBinary) ? null : \OC_Helper::findBinaryPath('ffmpeg'); diff --git a/tests/lib/Preview/OfficeTest.php b/tests/lib/Preview/OfficeTest.php index 15d66352c1..62981f2f00 100644 --- a/tests/lib/Preview/OfficeTest.php +++ b/tests/lib/Preview/OfficeTest.php @@ -30,7 +30,7 @@ namespace Test\Preview; */ class OfficeTest extends Provider { - public function setUp() { + public function setUp(): void { $libreofficeBinary = \OC_Helper::findBinaryPath('libreoffice'); $openofficeBinary = ($libreofficeBinary) ? null : \OC_Helper::findBinaryPath('openoffice'); diff --git a/tests/lib/Preview/Provider.php b/tests/lib/Preview/Provider.php index 2050b3f56b..761f6b7f83 100644 --- a/tests/lib/Preview/Provider.php +++ b/tests/lib/Preview/Provider.php @@ -46,7 +46,7 @@ abstract class Provider extends \Test\TestCase { /** @var \OC\Files\Storage\Storage */ protected $storage; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $userManager = \OC::$server->getUserManager(); @@ -68,7 +68,7 @@ abstract class Provider extends \Test\TestCase { $this->userId = $userId; } - protected function tearDown() { + protected function tearDown(): void { $this->logout(); parent::tearDown(); diff --git a/tests/lib/Preview/SVGTest.php b/tests/lib/Preview/SVGTest.php index 39bf3f1dfc..ccfeede75e 100644 --- a/tests/lib/Preview/SVGTest.php +++ b/tests/lib/Preview/SVGTest.php @@ -30,7 +30,7 @@ namespace Test\Preview; */ class SVGTest extends Provider { - public function setUp() { + public function setUp(): void { $checkImagick = new \Imagick(); if (count($checkImagick->queryFormats('SVG')) === 1) { parent::setUp(); diff --git a/tests/lib/Preview/TXTTest.php b/tests/lib/Preview/TXTTest.php index dfa0b920e1..f2cdb72cdd 100644 --- a/tests/lib/Preview/TXTTest.php +++ b/tests/lib/Preview/TXTTest.php @@ -30,7 +30,7 @@ namespace Test\Preview; */ class TXTTest extends Provider { - public function setUp() { + public function setUp(): void { parent::setUp(); $fileName = 'lorem-big.txt'; diff --git a/tests/lib/Remote/Api/OCSTest.php b/tests/lib/Remote/Api/OCSTest.php index 5bdc0c21a9..af0b570c09 100644 --- a/tests/lib/Remote/Api/OCSTest.php +++ b/tests/lib/Remote/Api/OCSTest.php @@ -35,7 +35,7 @@ class OCSTest extends TestCase { /** @var IInstanceFactory */ private $instanceFactory; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->instanceFactory = new InstanceFactory(new ArrayCache(), $this->getClientService()); diff --git a/tests/lib/Remote/InstanceTest.php b/tests/lib/Remote/InstanceTest.php index 9fc4cfc017..7253228f23 100644 --- a/tests/lib/Remote/InstanceTest.php +++ b/tests/lib/Remote/InstanceTest.php @@ -34,7 +34,7 @@ class InstanceTest extends TestCase { /** @var ICache */ private $cache; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->cache = new ArrayCache(); diff --git a/tests/lib/Repair/CleanTagsTest.php b/tests/lib/Repair/CleanTagsTest.php index 58fc6af6ef..5ff13beba7 100644 --- a/tests/lib/Repair/CleanTagsTest.php +++ b/tests/lib/Repair/CleanTagsTest.php @@ -35,7 +35,7 @@ class CleanTagsTest extends \Test\TestCase { /** @var IOutput */ private $outputMock; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->outputMock = $this->getMockBuilder('\OCP\Migration\IOutput') @@ -51,7 +51,7 @@ class CleanTagsTest extends \Test\TestCase { $this->cleanUpTables(); } - protected function tearDown() { + protected function tearDown(): void { $this->cleanUpTables(); parent::tearDown(); diff --git a/tests/lib/Repair/ClearFrontendCachesTest.php b/tests/lib/Repair/ClearFrontendCachesTest.php index 7c3a54cf1d..ea33d331c4 100644 --- a/tests/lib/Repair/ClearFrontendCachesTest.php +++ b/tests/lib/Repair/ClearFrontendCachesTest.php @@ -45,7 +45,7 @@ class ClearFrontendCachesTest extends \Test\TestCase { /** @var IOutput */ private $outputMock; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->outputMock = $this->createMock(IOutput::class); diff --git a/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php b/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php index e52fcbe7c2..218a59caa3 100644 --- a/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php +++ b/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php @@ -42,7 +42,7 @@ class ClearGeneratedAvatarCacheTest extends \Test\TestCase { /** @var ClearGeneratedAvatarCache */ protected $repair; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->outputMock = $this->createMock(IOutput::class); diff --git a/tests/lib/Repair/NC11/FixMountStoragesTest.php b/tests/lib/Repair/NC11/FixMountStoragesTest.php index fe1b75cac9..891f7d600e 100644 --- a/tests/lib/Repair/NC11/FixMountStoragesTest.php +++ b/tests/lib/Repair/NC11/FixMountStoragesTest.php @@ -43,7 +43,7 @@ class FixMountStoragesTest extends TestCase { /** @var FixMountStorages */ private $repair; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->db = \OC::$server->getDatabaseConnection(); diff --git a/tests/lib/Repair/OldGroupMembershipSharesTest.php b/tests/lib/Repair/OldGroupMembershipSharesTest.php index cc04a80eef..331a86d01d 100644 --- a/tests/lib/Repair/OldGroupMembershipSharesTest.php +++ b/tests/lib/Repair/OldGroupMembershipSharesTest.php @@ -30,7 +30,7 @@ class OldGroupMembershipSharesTest extends \Test\TestCase { /** @var \OCP\IGroupManager|\PHPUnit_Framework_MockObject_MockObject */ protected $groupManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); /** \OCP\IGroupManager|\PHPUnit_Framework_MockObject_MockObject */ @@ -42,7 +42,7 @@ class OldGroupMembershipSharesTest extends \Test\TestCase { $this->deleteAllShares(); } - protected function tearDown() { + protected function tearDown(): void { $this->deleteAllShares(); parent::tearDown(); diff --git a/tests/lib/Repair/RepairCollationTest.php b/tests/lib/Repair/RepairCollationTest.php index d84f689cc5..62471fbbe3 100644 --- a/tests/lib/Repair/RepairCollationTest.php +++ b/tests/lib/Repair/RepairCollationTest.php @@ -58,7 +58,7 @@ class RepairCollationTest extends TestCase { /** @var ILogger */ private $logger; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -75,7 +75,7 @@ class RepairCollationTest extends TestCase { $this->repair = new TestCollationRepair($this->config, $this->logger, $this->connection, false); } - protected function tearDown() { + protected function tearDown(): void { $this->connection->getSchemaManager()->dropTable($this->tableName); parent::tearDown(); } diff --git a/tests/lib/Repair/RepairInvalidSharesTest.php b/tests/lib/Repair/RepairInvalidSharesTest.php index f28d6807d6..1baaf89e0a 100644 --- a/tests/lib/Repair/RepairInvalidSharesTest.php +++ b/tests/lib/Repair/RepairInvalidSharesTest.php @@ -31,7 +31,7 @@ class RepairInvalidSharesTest extends TestCase { /** @var \OCP\IDBConnection */ private $connection; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->getMockBuilder(IConfig::class) @@ -49,7 +49,7 @@ class RepairInvalidSharesTest extends TestCase { $this->repair = new RepairInvalidShares($config, $this->connection); } - protected function tearDown() { + protected function tearDown(): void { $this->deleteAllShares(); parent::tearDown(); diff --git a/tests/lib/Repair/RepairMimeTypesTest.php b/tests/lib/Repair/RepairMimeTypesTest.php index 6579c3213c..013e170cc9 100644 --- a/tests/lib/Repair/RepairMimeTypesTest.php +++ b/tests/lib/Repair/RepairMimeTypesTest.php @@ -33,7 +33,7 @@ class RepairMimeTypesTest extends \Test\TestCase { /** @var IMimeTypeLoader */ private $mimetypeLoader; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->savedMimetypeLoader = \OC::$server->getMimeTypeLoader(); @@ -53,7 +53,7 @@ class RepairMimeTypesTest extends \Test\TestCase { $this->repair = new \OC\Repair\RepairMimeTypes($config); } - protected function tearDown() { + protected function tearDown(): void { $this->storage->getCache()->clear(); $qb = \OC::$server->getDatabaseConnection()->getQueryBuilder(); diff --git a/tests/lib/Repair/RepairSqliteAutoincrementTest.php b/tests/lib/Repair/RepairSqliteAutoincrementTest.php index 2218628377..c7008179a0 100644 --- a/tests/lib/Repair/RepairSqliteAutoincrementTest.php +++ b/tests/lib/Repair/RepairSqliteAutoincrementTest.php @@ -36,7 +36,7 @@ class RepairSqliteAutoincrementTest extends \Test\TestCase { */ private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -52,7 +52,7 @@ class RepairSqliteAutoincrementTest extends \Test\TestCase { $this->repair = new \OC\Repair\SqliteAutoincrement($this->connection); } - protected function tearDown() { + protected function tearDown(): void { $this->connection->getSchemaManager()->dropTable($this->tableName); parent::tearDown(); } diff --git a/tests/lib/RepairStepTest.php b/tests/lib/RepairStepTest.php index 1ec28de876..53b743cf13 100644 --- a/tests/lib/RepairStepTest.php +++ b/tests/lib/RepairStepTest.php @@ -39,7 +39,7 @@ class RepairTest extends TestCase { /** @var string[] */ private $outputArray; - public function setUp() { + public function setUp(): void { parent::setUp(); $dispatcher = new EventDispatcher(); $this->repair = new \OC\Repair([], $dispatcher); diff --git a/tests/lib/Security/Bruteforce/CapabilitiesTest.php b/tests/lib/Security/Bruteforce/CapabilitiesTest.php index e9b998c7bc..001d998361 100644 --- a/tests/lib/Security/Bruteforce/CapabilitiesTest.php +++ b/tests/lib/Security/Bruteforce/CapabilitiesTest.php @@ -36,7 +36,7 @@ class CapabilitiesTest extends TestCase { /** @var Throttler|\PHPUnit_Framework_MockObject_MockObject */ private $throttler; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/tests/lib/Security/Bruteforce/ThrottlerTest.php b/tests/lib/Security/Bruteforce/ThrottlerTest.php index e68ae70e15..7fbcd763ce 100644 --- a/tests/lib/Security/Bruteforce/ThrottlerTest.php +++ b/tests/lib/Security/Bruteforce/ThrottlerTest.php @@ -44,7 +44,7 @@ class ThrottlerTest extends TestCase { /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ private $config; - public function setUp() { + public function setUp(): void { $this->dbConnection = $this->createMock(IDBConnection::class); $this->logger = $this->createMock(ILogger::class); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Security/CSP/ContentSecurityPolicyManagerTest.php b/tests/lib/Security/CSP/ContentSecurityPolicyManagerTest.php index 7ee7350c66..e96111a06d 100644 --- a/tests/lib/Security/CSP/ContentSecurityPolicyManagerTest.php +++ b/tests/lib/Security/CSP/ContentSecurityPolicyManagerTest.php @@ -37,7 +37,7 @@ class ContentSecurityPolicyManagerTest extends TestCase { /** @var ContentSecurityPolicyManager */ private $contentSecurityPolicyManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->dispatcher = \OC::$server->query(IEventDispatcher::class); $this->contentSecurityPolicyManager = new ContentSecurityPolicyManager($this->dispatcher); diff --git a/tests/lib/Security/CSP/ContentSecurityPolicyNonceManagerTest.php b/tests/lib/Security/CSP/ContentSecurityPolicyNonceManagerTest.php index 705a0b22db..cb2a8f0d93 100644 --- a/tests/lib/Security/CSP/ContentSecurityPolicyNonceManagerTest.php +++ b/tests/lib/Security/CSP/ContentSecurityPolicyNonceManagerTest.php @@ -35,7 +35,7 @@ class ContentSecurityPolicyNonceManagerTest extends TestCase { /** @var ContentSecurityPolicyNonceManager */ private $nonceManager; - public function setUp() { + public function setUp(): void { $this->csrfTokenManager = $this->createMock(CsrfTokenManager::class); $this->request = $this->createMock(Request::class); $this->nonceManager = new ContentSecurityPolicyNonceManager( diff --git a/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php b/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php index 424f620b61..314902fb72 100644 --- a/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php +++ b/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php @@ -27,7 +27,7 @@ class CsrfTokenGeneratorTest extends \Test\TestCase { /** @var \OC\Security\CSRF\CsrfTokenGenerator */ private $csrfTokenGenerator; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->random = $this->getMockBuilder('\OCP\Security\ISecureRandom') ->disableOriginalConstructor()->getMock(); diff --git a/tests/lib/Security/CSRF/CsrfTokenManagerTest.php b/tests/lib/Security/CSRF/CsrfTokenManagerTest.php index f9dd8127e5..0f9755c225 100644 --- a/tests/lib/Security/CSRF/CsrfTokenManagerTest.php +++ b/tests/lib/Security/CSRF/CsrfTokenManagerTest.php @@ -29,7 +29,7 @@ class CsrfTokenManagerTest extends \Test\TestCase { /** @var \OC\Security\CSRF\TokenStorage\SessionStorage */ private $storageInterface; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->tokenGenerator = $this->getMockBuilder('\OC\Security\CSRF\CsrfTokenGenerator') ->disableOriginalConstructor()->getMock(); diff --git a/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php b/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php index 92a6557f8e..19b13f76d8 100644 --- a/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php +++ b/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php @@ -29,7 +29,7 @@ class SessionStorageTest extends \Test\TestCase { /** @var \OC\Security\CSRF\TokenStorage\SessionStorage */ private $sessionStorage; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->session = $this->getMockBuilder(ISession::class) ->disableOriginalConstructor()->getMock(); diff --git a/tests/lib/Security/CertificateManagerTest.php b/tests/lib/Security/CertificateManagerTest.php index 04da057a14..e7d15e65c5 100644 --- a/tests/lib/Security/CertificateManagerTest.php +++ b/tests/lib/Security/CertificateManagerTest.php @@ -31,7 +31,7 @@ class CertificateManagerTest extends \Test\TestCase { /** @var ISecureRandom */ private $random; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->username = $this->getUniqueID('', 20); @@ -62,7 +62,7 @@ class CertificateManagerTest extends \Test\TestCase { ); } - protected function tearDown() { + protected function tearDown(): void { $user = \OC::$server->getUserManager()->get($this->username); if ($user !== null) { $user->delete(); diff --git a/tests/lib/Security/CertificateTest.php b/tests/lib/Security/CertificateTest.php index 21d1dab4ab..c9d6ea90bd 100644 --- a/tests/lib/Security/CertificateTest.php +++ b/tests/lib/Security/CertificateTest.php @@ -32,7 +32,7 @@ class CertificateTest extends \Test\TestCase { /** @var Certificate That contains an expired certificate */ protected $expiredCertificate; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $goodCertificate = file_get_contents(__DIR__ . '/../../data/certificates/goodCertificate.crt'); diff --git a/tests/lib/Security/CredentialsManagerTest.php b/tests/lib/Security/CredentialsManagerTest.php index d1cbdcd336..0b93c704b5 100644 --- a/tests/lib/Security/CredentialsManagerTest.php +++ b/tests/lib/Security/CredentialsManagerTest.php @@ -38,7 +38,7 @@ class CredentialsManagerTest extends \Test\TestCase { /** @var CredentialsManager */ protected $manager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->crypto = $this->createMock(ICrypto::class); $this->dbConnection = $this->getMockBuilder('\OC\DB\Connection') diff --git a/tests/lib/Security/CryptoTest.php b/tests/lib/Security/CryptoTest.php index ff164cddc9..b0032a555f 100644 --- a/tests/lib/Security/CryptoTest.php +++ b/tests/lib/Security/CryptoTest.php @@ -24,7 +24,7 @@ class CryptoTest extends \Test\TestCase { /** @var Crypto */ protected $crypto; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->crypto = new Crypto(\OC::$server->getConfig(), \OC::$server->getSecureRandom()); } diff --git a/tests/lib/Security/FeaturePolicy/FeaturePolicyManagerTest.php b/tests/lib/Security/FeaturePolicy/FeaturePolicyManagerTest.php index b4182068b8..ec8ffbee77 100644 --- a/tests/lib/Security/FeaturePolicy/FeaturePolicyManagerTest.php +++ b/tests/lib/Security/FeaturePolicy/FeaturePolicyManagerTest.php @@ -42,7 +42,7 @@ class FeaturePolicyManagerTest extends TestCase { /** @var FeaturePolicyManager */ private $manager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->dispatcher = \OC::$server->query(IEventDispatcher::class); $this->manager = new FeaturePolicyManager($this->dispatcher); diff --git a/tests/lib/Security/HasherTest.php b/tests/lib/Security/HasherTest.php index c994b68f78..3222b5d098 100644 --- a/tests/lib/Security/HasherTest.php +++ b/tests/lib/Security/HasherTest.php @@ -97,7 +97,7 @@ class HasherTest extends \Test\TestCase { /** @var IConfig */ protected $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Security/IdentityProof/KeyTest.php b/tests/lib/Security/IdentityProof/KeyTest.php index bb550bd1b2..34493df987 100644 --- a/tests/lib/Security/IdentityProof/KeyTest.php +++ b/tests/lib/Security/IdentityProof/KeyTest.php @@ -30,7 +30,7 @@ class KeyTest extends TestCase { /** @var Key */ private $key; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->key = new Key('public', 'private'); diff --git a/tests/lib/Security/IdentityProof/ManagerTest.php b/tests/lib/Security/IdentityProof/ManagerTest.php index 2d66845ba8..9e58ac5c00 100644 --- a/tests/lib/Security/IdentityProof/ManagerTest.php +++ b/tests/lib/Security/IdentityProof/ManagerTest.php @@ -50,7 +50,7 @@ class ManagerTest extends TestCase { /** @var ILogger|MockObject */ private $logger; - public function setUp() { + public function setUp(): void { parent::setUp(); /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */ diff --git a/tests/lib/Security/IdentityProof/SignerTest.php b/tests/lib/Security/IdentityProof/SignerTest.php index 114c03348f..850ae08d4f 100644 --- a/tests/lib/Security/IdentityProof/SignerTest.php +++ b/tests/lib/Security/IdentityProof/SignerTest.php @@ -89,7 +89,7 @@ gQIDAQAB /** @var Signer */ private $signer; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->key = new Key($this->public, $this->private); diff --git a/tests/lib/Security/RateLimiting/Backend/MemoryCacheTest.php b/tests/lib/Security/RateLimiting/Backend/MemoryCacheTest.php index 098c40ba0e..d117f7d8c7 100644 --- a/tests/lib/Security/RateLimiting/Backend/MemoryCacheTest.php +++ b/tests/lib/Security/RateLimiting/Backend/MemoryCacheTest.php @@ -37,7 +37,7 @@ class MemoryCacheTest extends TestCase { /** @var MemoryCache */ private $memoryCache; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->cacheFactory = $this->createMock(ICacheFactory::class); diff --git a/tests/lib/Security/RateLimiting/LimiterTest.php b/tests/lib/Security/RateLimiting/LimiterTest.php index 5d42104ba8..1e72f8e496 100644 --- a/tests/lib/Security/RateLimiting/LimiterTest.php +++ b/tests/lib/Security/RateLimiting/LimiterTest.php @@ -38,7 +38,7 @@ class LimiterTest extends TestCase { /** @var Limiter */ private $limiter; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->timeFactory = $this->createMock(ITimeFactory::class); diff --git a/tests/lib/Security/SecureRandomTest.php b/tests/lib/Security/SecureRandomTest.php index 500e18d0ca..71839115a3 100644 --- a/tests/lib/Security/SecureRandomTest.php +++ b/tests/lib/Security/SecureRandomTest.php @@ -35,7 +35,7 @@ class SecureRandomTest extends \Test\TestCase { /** @var SecureRandom */ protected $rng; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->rng = new \OC\Security\SecureRandom(); } diff --git a/tests/lib/Security/TrustedDomainHelperTest.php b/tests/lib/Security/TrustedDomainHelperTest.php index 3fe0889b79..26158401f7 100644 --- a/tests/lib/Security/TrustedDomainHelperTest.php +++ b/tests/lib/Security/TrustedDomainHelperTest.php @@ -18,7 +18,7 @@ class TrustedDomainHelperTest extends \Test\TestCase { /** @var IConfig */ protected $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); diff --git a/tests/lib/ServerTest.php b/tests/lib/ServerTest.php index 604e11ec11..54eaa159d1 100644 --- a/tests/lib/ServerTest.php +++ b/tests/lib/ServerTest.php @@ -38,7 +38,7 @@ class ServerTest extends \Test\TestCase { protected $server; - public function setUp() { + public function setUp(): void { parent::setUp(); $config = new \OC\Config(\OC::$configDir); $this->server = new \OC\Server('', $config); diff --git a/tests/lib/Session/CryptoSessionDataTest.php b/tests/lib/Session/CryptoSessionDataTest.php index ee6bcbf11c..472856b90d 100644 --- a/tests/lib/Session/CryptoSessionDataTest.php +++ b/tests/lib/Session/CryptoSessionDataTest.php @@ -30,7 +30,7 @@ class CryptoSessionDataTest extends Session { /** @var \OCP\ISession */ protected $wrappedSession; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->wrappedSession = new \OC\Session\Memory($this->getUniqueID()); diff --git a/tests/lib/Session/CryptoWrappingTest.php b/tests/lib/Session/CryptoWrappingTest.php index f34148fb50..493d16bfbf 100644 --- a/tests/lib/Session/CryptoWrappingTest.php +++ b/tests/lib/Session/CryptoWrappingTest.php @@ -35,7 +35,7 @@ class CryptoWrappingTest extends TestCase { /** @var \OC\Session\CryptoSessionData */ protected $instance; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->wrappedSession = $this->getMockBuilder(ISession::class) diff --git a/tests/lib/Session/MemoryTest.php b/tests/lib/Session/MemoryTest.php index d92d7b90e5..7b60e0197f 100644 --- a/tests/lib/Session/MemoryTest.php +++ b/tests/lib/Session/MemoryTest.php @@ -11,7 +11,7 @@ namespace Test\Session; class MemoryTest extends Session { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->instance = new \OC\Session\Memory($this->getUniqueID()); } diff --git a/tests/lib/Session/Session.php b/tests/lib/Session/Session.php index a1ed01b2ec..0c947b8d30 100644 --- a/tests/lib/Session/Session.php +++ b/tests/lib/Session/Session.php @@ -15,7 +15,7 @@ abstract class Session extends \Test\TestCase { */ protected $instance; - protected function tearDown() { + protected function tearDown(): void { $this->instance->clear(); parent::tearDown(); } diff --git a/tests/lib/Settings/ManagerTest.php b/tests/lib/Settings/ManagerTest.php index 8d1c9f768e..f82a623b3d 100644 --- a/tests/lib/Settings/ManagerTest.php +++ b/tests/lib/Settings/ManagerTest.php @@ -51,7 +51,7 @@ class ManagerTest extends TestCase { /** @var IServerContainer|\PHPUnit_Framework_MockObject_MockObject */ private $container; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->logger = $this->createMock(ILogger::class); diff --git a/tests/lib/SetupTest.php b/tests/lib/SetupTest.php index 176a5b19f2..93c04ce844 100644 --- a/tests/lib/SetupTest.php +++ b/tests/lib/SetupTest.php @@ -36,7 +36,7 @@ class SetupTest extends \Test\TestCase { /** @var Installer|\PHPUnit_Framework_MockObject_MockObject */ protected $installer; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(SystemConfig::class); diff --git a/tests/lib/Share/ShareTest.php b/tests/lib/Share/ShareTest.php index 7db58d744d..af05d0c4bd 100644 --- a/tests/lib/Share/ShareTest.php +++ b/tests/lib/Share/ShareTest.php @@ -67,7 +67,7 @@ class ShareTest extends \Test\TestCase { /** @var IUserManager */ protected $userManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->groupManager = \OC::$server->getGroupManager(); @@ -113,7 +113,7 @@ class ShareTest extends \Test\TestCase { $this->dateInFuture = date($dateFormat, $now + 20 * 60); } - protected function tearDown() { + protected function tearDown(): void { $query = \OC_DB::prepare('DELETE FROM `*PREFIX*share` WHERE `item_type` = ?'); $query->execute(array('test')); \OC::$server->getConfig()->setAppValue('core', 'shareapi_allow_resharing', $this->resharing); diff --git a/tests/lib/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php index a9852882fa..0f0e77c320 100644 --- a/tests/lib/Share20/DefaultShareProviderTest.php +++ b/tests/lib/Share20/DefaultShareProviderTest.php @@ -73,7 +73,7 @@ class DefaultShareProviderTest extends \Test\TestCase { /** @var \PHPUnit_Framework_MockObject_MockObject|IURLGenerator */ protected $urlGenerator; - public function setUp() { + public function setUp(): void { $this->dbConn = \OC::$server->getDatabaseConnection(); $this->userManager = $this->createMock(IUserManager::class); $this->groupManager = $this->createMock(IGroupManager::class); @@ -100,7 +100,7 @@ class DefaultShareProviderTest extends \Test\TestCase { ); } - public function tearDown() { + public function tearDown(): void { $this->dbConn->getQueryBuilder()->delete('share')->execute(); $this->dbConn->getQueryBuilder()->delete('filecache')->execute(); $this->dbConn->getQueryBuilder()->delete('storages')->execute(); diff --git a/tests/lib/Share20/LegacyHooksTest.php b/tests/lib/Share20/LegacyHooksTest.php index 057173c4f3..d761d01179 100644 --- a/tests/lib/Share20/LegacyHooksTest.php +++ b/tests/lib/Share20/LegacyHooksTest.php @@ -42,7 +42,7 @@ class LegacyHooksTest extends TestCase { /** @var Manager */ private $manager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->eventDispatcher = new EventDispatcher(); diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index 3e34a64acf..45e5611447 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -101,7 +101,7 @@ class ManagerTest extends \Test\TestCase { /** @var \OC_Defaults|MockObject */ protected $defaults; - public function setUp() { + public function setUp(): void { $this->logger = $this->createMock(ILogger::class); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Share20/ShareHelperTest.php b/tests/lib/Share20/ShareHelperTest.php index 39141418f3..2562f16e2a 100644 --- a/tests/lib/Share20/ShareHelperTest.php +++ b/tests/lib/Share20/ShareHelperTest.php @@ -37,7 +37,7 @@ class ShareHelperTest extends TestCase { /** @var ShareHelper */ private $helper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->manager = $this->createMock(IManager::class); diff --git a/tests/lib/Share20/ShareTest.php b/tests/lib/Share20/ShareTest.php index 9e5c4970d3..45975d5996 100644 --- a/tests/lib/Share20/ShareTest.php +++ b/tests/lib/Share20/ShareTest.php @@ -36,7 +36,7 @@ class ShareTest extends \Test\TestCase { /** @var \OCP\Share\IShare */ protected $share; - public function setUp() { + public function setUp(): void { $this->rootFolder = $this->createMock(IRootFolder::class); $this->userManager = $this->createMock(IUserManager::class); $this->share = new \OC\Share20\Share($this->rootFolder, $this->userManager); diff --git a/tests/lib/SubAdminTest.php b/tests/lib/SubAdminTest.php index 8b293426e7..67d4bd1eb2 100644 --- a/tests/lib/SubAdminTest.php +++ b/tests/lib/SubAdminTest.php @@ -41,7 +41,7 @@ class SubAdminTest extends \Test\TestCase { /** @var \OCP\IGroup[] */ private $groups; - public function setup() { + public function setUp(): void { $this->users = []; $this->groups = []; @@ -83,7 +83,7 @@ class SubAdminTest extends \Test\TestCase { ->execute(); } - public function tearDown() { + public function tearDown(): void { foreach($this->users as $user) { $user->delete(); } diff --git a/tests/lib/Support/CrashReport/RegistryTest.php b/tests/lib/Support/CrashReport/RegistryTest.php index be769e257f..c45848b618 100644 --- a/tests/lib/Support/CrashReport/RegistryTest.php +++ b/tests/lib/Support/CrashReport/RegistryTest.php @@ -36,7 +36,7 @@ class RegistryTest extends TestCase { /** @var Registry */ private $registry; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->registry = new Registry(); diff --git a/tests/lib/Support/Subscription/RegistryTest.php b/tests/lib/Support/Subscription/RegistryTest.php index c9557def0f..a2246bf1b1 100644 --- a/tests/lib/Support/Subscription/RegistryTest.php +++ b/tests/lib/Support/Subscription/RegistryTest.php @@ -32,7 +32,7 @@ class RegistryTest extends TestCase { /** @var Registry */ private $registry; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->registry = new Registry(); diff --git a/tests/lib/SystemTag/SystemTagManagerTest.php b/tests/lib/SystemTag/SystemTagManagerTest.php index 41c838914c..2eb52889ab 100644 --- a/tests/lib/SystemTag/SystemTagManagerTest.php +++ b/tests/lib/SystemTag/SystemTagManagerTest.php @@ -49,7 +49,7 @@ class SystemTagManagerTest extends TestCase { */ private $dispatcher; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -67,7 +67,7 @@ class SystemTagManagerTest extends TestCase { $this->pruneTagsTables(); } - public function tearDown() { + public function tearDown(): void { $this->pruneTagsTables(); parent::tearDown(); } diff --git a/tests/lib/SystemTag/SystemTagObjectMapperTest.php b/tests/lib/SystemTag/SystemTagObjectMapperTest.php index 69cf7e8f81..9c0545c241 100644 --- a/tests/lib/SystemTag/SystemTagObjectMapperTest.php +++ b/tests/lib/SystemTag/SystemTagObjectMapperTest.php @@ -64,7 +64,7 @@ class SystemTagObjectMapperTest extends TestCase { */ private $tag3; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -108,7 +108,7 @@ class SystemTagObjectMapperTest extends TestCase { $this->tagMapper->assignTags('3', 'anothertype', $this->tag1->getId()); } - public function tearDown() { + public function tearDown(): void { $this->pruneTagsTables(); parent::tearDown(); } diff --git a/tests/lib/TagsTest.php b/tests/lib/TagsTest.php index 268521bed5..db0a77f68f 100644 --- a/tests/lib/TagsTest.php +++ b/tests/lib/TagsTest.php @@ -42,7 +42,7 @@ class TagsTest extends \Test\TestCase { /** @var \OCP\ITagManager */ protected $tagMgr; - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC_User::clearBackends(); @@ -65,7 +65,7 @@ class TagsTest extends \Test\TestCase { } - protected function tearDown() { + protected function tearDown(): void { $conn = \OC::$server->getDatabaseConnection(); $conn->executeQuery('DELETE FROM `*PREFIX*vcategory_to_object`'); $conn->executeQuery('DELETE FROM `*PREFIX*vcategory`'); diff --git a/tests/lib/TempManagerTest.php b/tests/lib/TempManagerTest.php index c9e069d9d0..6262bd5a00 100644 --- a/tests/lib/TempManagerTest.php +++ b/tests/lib/TempManagerTest.php @@ -26,7 +26,7 @@ class TempManagerTest extends \Test\TestCase { protected $baseDir = null; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->baseDir = $this->getManager()->getTempBaseDir() . $this->getUniqueID('/oc_tmp_test'); @@ -35,7 +35,7 @@ class TempManagerTest extends \Test\TestCase { } } - protected function tearDown() { + protected function tearDown(): void { \OC_Helper::rmdirr($this->baseDir); $this->baseDir = null; parent::tearDown(); diff --git a/tests/lib/Template/CSSResourceLocatorTest.php b/tests/lib/Template/CSSResourceLocatorTest.php index 790d1f44e1..7c9f358503 100644 --- a/tests/lib/Template/CSSResourceLocatorTest.php +++ b/tests/lib/Template/CSSResourceLocatorTest.php @@ -54,7 +54,7 @@ class CSSResourceLocatorTest extends \Test\TestCase { /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ private $timeFactory; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->logger = $this->createMock(ILogger::class); diff --git a/tests/lib/Template/IconsCacherTest.php b/tests/lib/Template/IconsCacherTest.php index 50b678da6d..8e36426393 100644 --- a/tests/lib/Template/IconsCacherTest.php +++ b/tests/lib/Template/IconsCacherTest.php @@ -50,7 +50,7 @@ class IconsCacherTest extends \Test\TestCase { /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ private $timeFactory; - protected function setUp() { + protected function setUp(): void { $this->logger = $this->createMock(ILogger::class); $this->appData = $this->createMock(AppData::class); $this->timeFactory = $this->createMock(ITimeFactory::class); diff --git a/tests/lib/Template/JSCombinerTest.php b/tests/lib/Template/JSCombinerTest.php index 51b15b8040..b12124ea5a 100644 --- a/tests/lib/Template/JSCombinerTest.php +++ b/tests/lib/Template/JSCombinerTest.php @@ -52,7 +52,7 @@ class JSCombinerTest extends \Test\TestCase { /** @var ICacheFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $cacheFactory; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->appData = $this->createMock(IAppData::class); diff --git a/tests/lib/Template/JSResourceLocatorTest.php b/tests/lib/Template/JSResourceLocatorTest.php index 400637ae96..38c5fc0ead 100644 --- a/tests/lib/Template/JSResourceLocatorTest.php +++ b/tests/lib/Template/JSResourceLocatorTest.php @@ -43,7 +43,7 @@ class JSResourceLocatorTest extends \Test\TestCase { /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ protected $logger; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->appData = $this->createMock(IAppData::class); diff --git a/tests/lib/Template/ResourceLocatorTest.php b/tests/lib/Template/ResourceLocatorTest.php index 580dfd60d0..90488071b4 100644 --- a/tests/lib/Template/ResourceLocatorTest.php +++ b/tests/lib/Template/ResourceLocatorTest.php @@ -15,7 +15,7 @@ class ResourceLocatorTest extends \Test\TestCase { /** @var \PHPUnit_Framework_MockObject_MockObject */ protected $logger; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->logger = $this->createMock(ILogger::class); } diff --git a/tests/lib/Template/SCSSCacherTest.php b/tests/lib/Template/SCSSCacherTest.php index 421046b38f..6f9fdf1e7f 100644 --- a/tests/lib/Template/SCSSCacherTest.php +++ b/tests/lib/Template/SCSSCacherTest.php @@ -62,7 +62,7 @@ class SCSSCacherTest extends \Test\TestCase { /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $timeFactory; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->logger = $this->createMock(ILogger::class); $this->appData = $this->createMock(AppData::class); diff --git a/tests/lib/TemplateFunctionsTest.php b/tests/lib/TemplateFunctionsTest.php index aa3c73d474..ac73873ce3 100644 --- a/tests/lib/TemplateFunctionsTest.php +++ b/tests/lib/TemplateFunctionsTest.php @@ -24,7 +24,7 @@ namespace Test; class TemplateFunctionsTest extends \Test\TestCase { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $loader = new \OC\Autoloader([\OC::$SERVERROOT . '/lib']); diff --git a/tests/lib/TestCase.php b/tests/lib/TestCase.php index 96ee0f06f8..b80e720efd 100644 --- a/tests/lib/TestCase.php +++ b/tests/lib/TestCase.php @@ -108,7 +108,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase { }); } - protected function setUp() { + protected function setUp(): void { // overwrite the command bus with one we can run ourselves $this->commandBus = new QueueBus(); $this->overwriteService('AsyncCommandBus', $this->commandBus); @@ -134,7 +134,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase { } } - protected function onNotSuccessfulTest(\Throwable $t) { + protected function onNotSuccessfulTest(\Throwable $t): void { $this->restoreAllServices(); // restore database connection @@ -147,7 +147,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase { parent::onNotSuccessfulTest($t); } - protected function tearDown() { + protected function tearDown(): void { $this->restoreAllServices(); // restore database connection @@ -238,7 +238,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase { ); } - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { if (!self::$wasDatabaseAllowed && self::$realDatabase !== null) { // in case an error is thrown in a test, PHPUnit jumps straight to tearDownAfterClass, // so we need the database again diff --git a/tests/lib/Traits/EncryptionTrait.php b/tests/lib/Traits/EncryptionTrait.php index 1f389fc82c..ad98ba9121 100644 --- a/tests/lib/Traits/EncryptionTrait.php +++ b/tests/lib/Traits/EncryptionTrait.php @@ -23,8 +23,8 @@ trait EncryptionTrait { abstract protected function registerStorageWrapper($name, $wrapper); // from phpunit - abstract protected function markTestSkipped($reason = ''); - abstract protected function assertTrue($condition, $message = ''); + abstract protected function markTestSkipped(string $message = ''): void; + abstract protected function assertTrue($condition, string $message = ''): void; private $encryptionWasEnabled; diff --git a/tests/lib/Updater/ChangesCheckTest.php b/tests/lib/Updater/ChangesCheckTest.php index fe25e8ceba..b5aab5be65 100644 --- a/tests/lib/Updater/ChangesCheckTest.php +++ b/tests/lib/Updater/ChangesCheckTest.php @@ -49,7 +49,7 @@ class ChangesCheckTest extends TestCase { /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ protected $logger; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->clientService = $this->createMock(IClientService::class); diff --git a/tests/lib/Updater/VersionCheckTest.php b/tests/lib/Updater/VersionCheckTest.php index eef16eeb52..911e883e99 100644 --- a/tests/lib/Updater/VersionCheckTest.php +++ b/tests/lib/Updater/VersionCheckTest.php @@ -33,7 +33,7 @@ class VersionCheckTest extends \Test\TestCase { /** @var VersionCheck | \PHPUnit_Framework_MockObject_MockObject*/ private $updater; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() diff --git a/tests/lib/UpdaterTest.php b/tests/lib/UpdaterTest.php index 47028cf3f1..2df235b384 100644 --- a/tests/lib/UpdaterTest.php +++ b/tests/lib/UpdaterTest.php @@ -40,7 +40,7 @@ class UpdaterTest extends TestCase { /** @var Installer|\PHPUnit_Framework_MockObject_MockObject */ private $installer; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() diff --git a/tests/lib/UrlGeneratorTest.php b/tests/lib/UrlGeneratorTest.php index 9a8e588a22..0582a7120b 100644 --- a/tests/lib/UrlGeneratorTest.php +++ b/tests/lib/UrlGeneratorTest.php @@ -28,7 +28,7 @@ class UrlGeneratorTest extends \Test\TestCase { /** @var string */ private $originalWebRoot; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); $this->cacheFactory = $this->createMock(ICacheFactory::class); @@ -41,7 +41,7 @@ class UrlGeneratorTest extends \Test\TestCase { $this->originalWebRoot = \OC::$WEBROOT; } - public function tearDown() { + public function tearDown(): void { // Reset webRoot \OC::$WEBROOT = $this->originalWebRoot; } diff --git a/tests/lib/User/DatabaseTest.php b/tests/lib/User/DatabaseTest.php index 8e52be50c7..202a8225f9 100644 --- a/tests/lib/User/DatabaseTest.php +++ b/tests/lib/User/DatabaseTest.php @@ -47,7 +47,7 @@ class DatabaseTest extends Backend { return $user; } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->eventDispatcher = $this->createMock(IEventDispatcher::class); @@ -55,7 +55,7 @@ class DatabaseTest extends Backend { $this->backend=new \OC\User\Database($this->eventDispatcher); } - protected function tearDown() { + protected function tearDown(): void { if(!isset($this->users)) { return; } diff --git a/tests/lib/User/Dummy.php b/tests/lib/User/Dummy.php index 50382aa8fe..7eb5cc41ba 100644 --- a/tests/lib/User/Dummy.php +++ b/tests/lib/User/Dummy.php @@ -23,7 +23,7 @@ namespace Test\User; class Dummy extends Backend { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->backend=new \Test\Util\User\Dummy(); } diff --git a/tests/lib/User/ManagerTest.php b/tests/lib/User/ManagerTest.php index b99d499b2a..4d70e30273 100644 --- a/tests/lib/User/ManagerTest.php +++ b/tests/lib/User/ManagerTest.php @@ -30,7 +30,7 @@ class ManagerTest extends TestCase { /** @var EventDispatcherInterface */ private $dispatcher; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/User/SessionTest.php b/tests/lib/User/SessionTest.php index a37181c504..a9d466e540 100644 --- a/tests/lib/User/SessionTest.php +++ b/tests/lib/User/SessionTest.php @@ -61,7 +61,7 @@ class SessionTest extends \Test\TestCase { /** @var IEventDispatcher|MockObject */ private $dispatcher; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->timeFactory = $this->createMock(ITimeFactory::class); diff --git a/tests/lib/User/UserTest.php b/tests/lib/User/UserTest.php index a800e79037..b4964e2820 100644 --- a/tests/lib/User/UserTest.php +++ b/tests/lib/User/UserTest.php @@ -33,7 +33,7 @@ class UserTest extends TestCase { /** @var EventDispatcherInterface|MockObject */ protected $dispatcher; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->dispatcher = $this->createMock(EventDispatcherInterface::class); } diff --git a/tests/lib/UtilCheckServerTest.php b/tests/lib/UtilCheckServerTest.php index c597a6b770..3f956601ce 100644 --- a/tests/lib/UtilCheckServerTest.php +++ b/tests/lib/UtilCheckServerTest.php @@ -36,7 +36,7 @@ class UtilCheckServerTest extends \Test\TestCase { return $config; } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->datadir = \OC::$server->getTempManager()->getTemporaryFolder(); @@ -45,7 +45,7 @@ class UtilCheckServerTest extends \Test\TestCase { \OC::$server->getSession()->set('checkServer_succeeded', false); } - protected function tearDown() { + protected function tearDown(): void { // clean up @unlink($this->datadir . '/.ocdata'); parent::tearDown(); diff --git a/tests/lib/UtilTest.php b/tests/lib/UtilTest.php index d731085af4..a5ddd50ab2 100644 --- a/tests/lib/UtilTest.php +++ b/tests/lib/UtilTest.php @@ -348,13 +348,13 @@ class UtilTest extends \Test\TestCase { $this->assertNotEmpty($errors); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC_Util::$scripts = []; \OC_Util::$styles = []; } - protected function tearDown() { + protected function tearDown(): void { parent::tearDown(); \OC_Util::$scripts = []; diff --git a/tests/phpunit-autotest.xml b/tests/phpunit-autotest.xml index b09b571c1c..da786c765f 100644 --- a/tests/phpunit-autotest.xml +++ b/tests/phpunit-autotest.xml @@ -1,6 +1,5 @@ getSession() instanceof Memory) { /** @var $session Memory */