diff options
Diffstat (limited to 'apps')
293 files changed, 366 insertions, 366 deletions
diff --git a/apps/admin_audit/tests/Actions/SecurityTest.php b/apps/admin_audit/tests/Actions/SecurityTest.php index 3a3f25933f4..c7295452482 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 4454101bb38..162cd2eb747 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 6ff3bc54b0d..2117b79350f 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 0cc3e3d4b61..727014b8fcb 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 9df81f01b02..029a04dcb80 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 b27b851cc5e..c9841a553fb 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 ad2f34c7aab..4133daef3ce 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 e31b227bce8..8d892062688 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 d008c4c3121..1fb1cd7736e 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 07eb9670279..e5a2bfa862f 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 2d80b5bf0ea..b516e26a8c6 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 c3b4b7e54c2..c55ffcf72c0 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 acf1306a632..f00d083b796 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 a26378038d1..5af694fda89 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 a08d3824d7f..c71a80b369e 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 e451570b73f..37fccc3d4ae 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 9f9a7c01337..3facbeb954d 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 3b4e0038b59..07597458681 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 1c31508255a..b19f48762b5 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 f060e7a0b37..f8b505f6c51 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 db4d3e55fd8..64f9b6f86af 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 44bf9237b2f..d2935850e51 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 a7981cfa159..c93e436b1a1 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 ca3256773b3..432447ef5f7 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 1831840610c..89fe6972f9d 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 7ce43f40916..8af6524b8aa 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 be5dc33fc61..3da6d8a9b9b 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 87bf69c2805..65b135cf905 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 51977313ed4..0bbfe997304 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 ed803c67dd3..728905e6e6c 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 dae3cb74e24..9ba3b15b23c 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 889ac867315..305cf4866db 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 a288907b4ba..2654ac8b45c 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 346faf1a65e..c2a95278b3f 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 d55f15ee5ae..9eecc37fb1a 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 8d38617ad2a..6bb6a8be1c8 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 73f5ddde15d..503478acc01 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 ea2a7520227..5f59af260c1 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 ef71cd3b8d7..5d9e3e8455c 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 92788f0d7a8..34fa8e38f14 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 967f3a51481..58342db12f2 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 ff6c0837c7a..a489839fc82 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 12eb74259fc..414e4bc971a 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 833221bd3ea..02468e9686f 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 06ea1329ec0..6bfda95a70e 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 aa18ef63a5c..adc6df952ac 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 dbb035a33d3..8484d3447f2 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 f7b9137b480..3fee2bcc827 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 c8dce8598a3..105612b5cb9 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 f2d315504b5..9cd02805133 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 94bcce03f3a..50c1a57e0a8 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 be55ac186b0..1e415ceafca 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 f38546f329e..3c230ccfd43 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 c713a2d0cd7..537989d9404 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 2657e117b12..2097c7ef03a 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 9add05ee630..9286b46d2b0 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 2391d885baf..a0e72bcd425 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 d23d9743e6b..150a0fc000f 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 a449b8f9431..447a10afc79 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 9b3163d1106..2af8fc4c74d 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 88baf981acc..03c1ef1ff93 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 90bcb5f511c..b605aba2bc2 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 cc47a3a4805..5685580c03a 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 1f58351622f..69f67f607b2 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 a6dc1592db0..ee64eb5bce6 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 aec70328788..1d22579bdd1 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 0510e36a362..c2c808a8d95 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 0157757a737..c41f3f65249 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 65130b64a84..7322b71a7ec 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 37a72da0bf2..ea58c50480c 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 71448c1ba12..a604757520d 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 54ec1f5aeee..5320bd28302 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 88b6316b689..d9fd17dcb72 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 fe31ccba13c..b7d88b2208e 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 6494dab2b19..85d285f2c3b 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 0f6f4f6ef24..384441f4495 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 a105daa2608..509ccb7e353 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 e52c67ac30c..18034891dc8 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 7efb64e3dd4..44ca70b9342 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 a7731f8b026..d43e42b93b7 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 e5be0d75d53..356299dab56 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 75baf8257da..6b64abc8442 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 96cabfab1ce..38eb86baf27 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 2203e7c7686..c48b34bb175 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 dbbfb1fe1ff..8a976ff5dbf 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 20a7566c2fd..b524af5f390 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 90e8b007833..f311b0f2cb3 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 8f2aa7f8b57..063bf485501 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 1bd7ab4e232..460286ea76f 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 657d4dcebbb..a634737d1d0 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 693b3f61f9d..2f65fc7c45f 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 1b854a541c2..eeadf349710 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 a9df63a03ab..17bcf9fba97 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 77f69c0734a..926c652b77e 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 bfaff5c2141..d2bd59bff65 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 21afc4fc177..1282807842a 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 840b36e3f16..da46843a5b2 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 4795d54e849..ff56ae3d447 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 877fe56c6d8..5e4e539b1e7 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 410ab2fc021..bc2b434bcf7 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 ea591076470..ef6bd9eec22 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 79f03f214ea..5737f8e86ca 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 b50f7cd0b61..bc2a7ed853b 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 ffd12bd20b9..ccf33ffd37b 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 7ecb017b855..1731f25d532 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 64e29241a07..b314bb5b543 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 80ff97f17ee..f5f042aac66 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 1f628ff19c9..4136673a6ec 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 5db3d10cc8f..5ff76f918d4 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 c59343a7c9b..3853aaffaee 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 7af9e39e95d..6e5c51db3c8 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 942c3469c95..c9216e7778a 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 a11aca2f75b..25c652b36af 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 728ffe1d932..9df483916b7 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 141120671f2..4111498ac64 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 477501be1a8..77c070d7150 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 63691f61624..efea34dbab2 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 db4c3914115..88f486f3c69 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 57d82f63e16..d8903d438fb 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 ae233e565d1..31d13df8f31 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 d93b9d608c3..769184f1628 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 f0cf3b77d38..bca8ad73426 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 35fbd97803e..50fcada6d32 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 37798269a38..bd3c0f92911 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 adc621650af..b4e8365b502 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 e8f63fb30d3..d97919942af 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 df9f284d2c9..c625d960e5a 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 41312b8ef2c..9b283b50903 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 bad02685534..348f5b70308 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 34ac8dfd539..ad6e0bf8a77 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 eb063019424..4423233b93e 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 758bda6bc5e..0fc1f7c25ab 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 2148b4b3c00..e1c810bde97 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 209f41322c4..82e5654e63f 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 d3738ae41a7..da1f014ad05 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 bf4e78d6b21..4b0496a1aa6 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 a75e54edfee..8539c6ba7d3 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 684192858e7..c3f7d8712ac 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 22daf7c23b4..e5fbe7d3868 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 4de56082e98..c57be81b487 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 709ba3b9c98..4590277aeb4 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 c447be7a669..15f8f5f47a9 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 dcafdd84e3d..006bb458370 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 f18ee8323b3..a940f49fc2a 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 c3a684f2e98..bcc8d3e2d98 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 0340057809d..184b7a6c699 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 067fd45972c..ddd6d01717e 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 707ee899419..8cd1e680dea 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 e6115ddec20..375f1e7018a 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 2760374e59d..c4d1055521a 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 ef0f1852d91..4e2b73f2612 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 3a6d22f2ad4..9a6100d8075 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 ea6346151bf..ce0b3ab65b1 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 6236f2d416a..3889fe456e4 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 b83f8f0feef..3a8a4f5f780 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 83552ca21a3..985c93423a7 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 0e12a5f4afa..b2dd83b75a7 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 3853d0e6ce1..8a274af165e 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 c67d418f674..fe40c0fbd95 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 9ad7cfd56a8..bee514485a5 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 fc59f0ed38b..645cb0e2907 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 6517be493d7..2e1bc5e0ed3 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 c0d69592c2a..1aae245d675 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 5cf3906e565..05acb9c18e2 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 e8d8ae7f63b..d2f96d01eb8 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 8f516788761..93bef4afbf6 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 257d9c35dff..4e100cf2099 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 71a4f4adeba..d2237acbd7f 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 ed556172a27..cbe3872bb67 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 6452ad50019..32a2e88f781 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 01b20e58572..ec6fc9a598d 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 627990a2f90..b8d87d5cd68 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 c5d31e3b59d..20790fc0bfa 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 03f19525e0d..028878e3abd 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 e255f08ccf1..0f34f0785a7 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 02109e35db1..39ff1ff24f1 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 93c17ca10cf..2224b767083 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 fe77182e83f..b9bfb1a84a8 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 414e8790819..47394fc588f 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 a1d1f1bf551..06d33859a28 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 781861aa392..e6744d5fd1d 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 f49b472a35c..e3fb602acd6 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 c4c78b04a23..418ede9179a 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 f4acfdfafe7..5b20524da47 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 a64d0b25e17..e47cfff68dd 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 21cea3033af..5f16173725e 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 61bec2caea3..f0614d5c984 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 f01e9896efb..17b2abf3fce 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 e2cb65d9acc..c4cefee4a34 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 6c5f078f9e7..ce5ceb1f642 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 ce7767d1920..92ff48eb3be 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 2e044716d07..d20f794883a 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 59f84057a14..e332327a917 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 c4729d7a7c7..9a891e86522 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 9a517df1a54..74231ada18b 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 fd562b5cd04..a6891a6c07b 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 c98f5fd2b1e..99690933745 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 3b1fff31fe1..9e5b029d9dc 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 48720d2fbcc..ace8e842e7b 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 7c248b36349..e771b82a42d 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 b3023dbef65..d878ea9c3da 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 75096eefddd..3b18290ff8d 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 04fd3d6ecd9..1c7bed848a7 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 a14d7aad782..6519f9cf087 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 ebc6b55a382..8d60b10d145 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 80d69c3b1b8..78400672cbb 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 c6f7ab2a0e8..ec8787db83f 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 c9b762d1fb4..b7d40a6caac 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 7bd20e4233f..1056d3ba4c1 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 b22953ca043..676b809169e 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 e47db4fd51d..0c4fcd5071c 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 5ebc43d2b1d..70dad250585 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 7d65c5bc1bc..72b7b9527ea 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 f5d25608d66..2b7e3839e80 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 143312addc2..9b34015e946 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 39ca3e2b792..805aa147bec 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 49ba48f10d2..35ca7117900 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 2789fe00974..d3591c6d67a 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 9b09631226f..508a39642a5 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 ff698ffe225..435cd390f86 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 ed0e7775dc1..270e986e307 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 4d6a4c21f00..b038cf2af34 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 1607926219e..8440df6ec4e 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 58b82bc0930..d77f2303a6c 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 5ca45297c58..eb5790a0401 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 f99af1e2f91..77d606a9535 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 752184bf7c7..e2434c01b02 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 8cb394101e2..d0af05df913 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 5e26454a6fa..1b47dc874c1 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 ea9222ab1a7..778690de1c8 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 bcb990b6b6b..57c984fdb12 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 91b2edf14b1..37046d9d319 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 a55469c21e5..671fcd6f9b4 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 b1545994199..96fce010c1d 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 b7150e6c6dc..12d8fc4d919 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 744c2d6f3ee..8adc249ee61 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 40fcea750a6..0cb6f505371 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 6e23ab5f7b9..b9b7fb60f85 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 f007de1dbdb..76dd680b49a 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 85259b9abe7..df0fdd52b3f 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 63e5d1e285a..a626fdebe6d 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 69ec6495605..a6999c331ce 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 0f03c565e91..56fa63bea7b 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 a46e28235f5..b274e5868d6 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 5943866edc1..4e89366c3f2 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 09abf9e34f5..10d6bb172f2 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 71b8ba97e9b..b7413eaf47d 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 9fa5dd91da8..f8e1750113c 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 76cdac3c21a..a537600003b 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 679f111a75b..872a46b6259 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 17d332691d2..27a6e3f8772 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 235414ffe75..2e68c0e427b 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 fe68da8ebf5..a6dda9ce6aa 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 4c4fde1e0b0..c8274f9494c 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 44ea88cdb0b..65a5a8b61c9 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 21dde19d329..cfa3799bb20 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 c357fdeb2f0..05ef1cdb10a 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 8a4ce56d7cb..ef35705023f 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 7ae6eab3358..6d91ea36ee0 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 3c36a35f7c1..6f9834aecb0 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 0f03fba7de8..0bbdc8619b4 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 4dab536c552..ea9f7b95823 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 7c662d3ef83..f635fc6535c 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 98b08e633bb..38baeb907b5 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 694051d33f6..9e35194f066 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 f97ff776c93..d7a3fbbb149 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 d78a5ed94cc..c604da85706 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 d2d4b503bad..a0b7c4b0fe3 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 fc70d2d9451..1ad45074554 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 a51a396cfff..0d327ce2e06 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 6e45f163867..5820fff25ed 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 7a5da72fcdb..f08b5d9bf1d 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 54d7d8868ce..3804938199d 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 38f575db75b..493aa49c467 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 75ffd0e8280..d16ce6672df 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 deaa368806c..cbce73be295 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 3e754dbd272..a6c097c6f85 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 37502027df7..323a3464ce8 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 a85c4a4dc5e..c0bbd8098b1 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 0536d0b10af..32f601f2b11 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 193e460c3c7..8e91a00156b 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 84004b9d465..d421c379bf5 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 65dff000af3..0bd7a8010b6 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 916b5119ce0..e81a81f742f 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 1fb548f59bf..a8abd1e4667 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 c4563bf1f31..992d3ce990c 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 6671742c428..e8076a051a1 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 126391401e5..02a1815804c 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 1cae2f58e5f..05b0c5a9449 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 9e313122a1f..c986a2daab5 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 519b5112f3f..d8628b7c6f8 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 fe9da844ccc..79e3de44874 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 92111a6989b..0f142e642ed 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(); } |