aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/CalDAV/WebcalCaching
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/tests/unit/CalDAV/WebcalCaching')
-rw-r--r--apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php7
-rw-r--r--apps/dav/tests/unit/CalDAV/WebcalCaching/PluginTest.php2
-rw-r--r--apps/dav/tests/unit/CalDAV/WebcalCaching/RefreshWebcalServiceTest.php34
3 files changed, 11 insertions, 32 deletions
diff --git a/apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php b/apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php
index 5e9caaaeb44..35afc4d7ca7 100644
--- a/apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php
+++ b/apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php
@@ -13,7 +13,6 @@ use OCP\Http\Client\IClientService;
use OCP\Http\Client\IResponse;
use OCP\Http\Client\LocalServerException;
use OCP\IAppConfig;
-use OCP\IConfig;
use PHPUnit\Framework\MockObject\MockObject;
use Psr\Log\LoggerInterface;
@@ -21,9 +20,9 @@ use Test\TestCase;
class ConnectionTest extends TestCase {
- private IClientService|MockObject $clientService;
- private IConfig|MockObject $config;
- private LoggerInterface|MockObject $logger;
+ private IClientService&MockObject $clientService;
+ private IAppConfig&MockObject $config;
+ private LoggerInterface&MockObject $logger;
private Connection $connection;
public function setUp(): void {
diff --git a/apps/dav/tests/unit/CalDAV/WebcalCaching/PluginTest.php b/apps/dav/tests/unit/CalDAV/WebcalCaching/PluginTest.php
index 82c03c5cf68..804af021d5a 100644
--- a/apps/dav/tests/unit/CalDAV/WebcalCaching/PluginTest.php
+++ b/apps/dav/tests/unit/CalDAV/WebcalCaching/PluginTest.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
diff --git a/apps/dav/tests/unit/CalDAV/WebcalCaching/RefreshWebcalServiceTest.php b/apps/dav/tests/unit/CalDAV/WebcalCaching/RefreshWebcalServiceTest.php
index d65a99a15e0..3252322ccff 100644
--- a/apps/dav/tests/unit/CalDAV/WebcalCaching/RefreshWebcalServiceTest.php
+++ b/apps/dav/tests/unit/CalDAV/WebcalCaching/RefreshWebcalServiceTest.php
@@ -20,10 +20,10 @@ use Sabre\VObject\Recur\NoInstancesException;
use Test\TestCase;
class RefreshWebcalServiceTest extends TestCase {
- private CalDavBackend|MockObject $caldavBackend;
- private Connection|MockObject $connection;
- private LoggerInterface|MockObject $logger;
- private ITimeFactory|MockObject $time;
+ private CalDavBackend&MockObject $caldavBackend;
+ private Connection&MockObject $connection;
+ private LoggerInterface&MockObject $logger;
+ private ITimeFactory&MockObject $time;
protected function setUp(): void {
parent::setUp();
@@ -35,10 +35,6 @@ class RefreshWebcalServiceTest extends TestCase {
}
/**
- * @param string $body
- * @param string $contentType
- * @param string $result
- *
* @dataProvider runDataProvider
*/
public function testRun(string $body, string $contentType, string $result): void {
@@ -88,10 +84,6 @@ class RefreshWebcalServiceTest extends TestCase {
}
/**
- * @param string $body
- * @param string $contentType
- * @param string $result
- *
* @dataProvider identicalDataProvider
*/
public function testRunIdentical(string $uid, array $calendarObject, string $body, string $contentType, string $result): void {
@@ -209,10 +201,6 @@ class RefreshWebcalServiceTest extends TestCase {
}
/**
- * @param string $body
- * @param string $contentType
- * @param string $result
- *
* @dataProvider runDataProvider
*/
public function testRunCreateCalendarNoException(string $body, string $contentType, string $result): void {
@@ -259,10 +247,6 @@ class RefreshWebcalServiceTest extends TestCase {
}
/**
- * @param string $body
- * @param string $contentType
- * @param string $result
- *
* @dataProvider runDataProvider
*/
public function testRunCreateCalendarBadRequest(string $body, string $contentType, string $result): void {
@@ -308,10 +292,7 @@ class RefreshWebcalServiceTest extends TestCase {
$refreshWebcalService->refreshSubscription('principals/users/testuser', 'sub123');
}
- /**
- * @return array
- */
- public static function identicalDataProvider():array {
+ public static function identicalDataProvider(): array {
return [
[
'12345',
@@ -330,10 +311,7 @@ class RefreshWebcalServiceTest extends TestCase {
];
}
- /**
- * @return array
- */
- public function runDataProvider():array {
+ public static function runDataProvider(): array {
return [
[
"BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nUID:12345\r\nDTSTAMP:20160218T133704Z\r\nDTSTART;VALUE=DATE:19000101\r\nDTEND;VALUE=DATE:19000102\r\nRRULE:FREQ=YEARLY\r\nSUMMARY:12345's Birthday (1900)\r\nTRANSP:TRANSPARENT\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n",