aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/tests
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2020-04-11 08:21:35 +0200
committerGitHub <noreply@github.com>2020-04-11 08:21:35 +0200
commitb5a30d5cd6b53831c0d6d2fd074dc0000fa811de (patch)
tree386f3cb5df4630a1e87dae706667772e590596b8 /apps/dav/tests
parent97de425a171adf9194dae75eede74cf9f3356cc8 (diff)
parenteea282ccc0d9dfae2d321efddce99cdb18158338 (diff)
downloadnextcloud-server-b5a30d5cd6b53831c0d6d2fd074dc0000fa811de.tar.gz
nextcloud-server-b5a30d5cd6b53831c0d6d2fd074dc0000fa811de.zip
Merge pull request #20426 from nextcloud/techdebt/psr2
It is done
Diffstat (limited to 'apps/dav/tests')
-rw-r--r--apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php8
-rw-r--r--apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php2
-rw-r--r--apps/dav/tests/unit/CalDAV/Publishing/PublisherTest.php2
-rw-r--r--apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php2
-rw-r--r--apps/dav/tests/unit/CardDAV/CardDavBackendTest.php6
-rw-r--r--apps/dav/tests/unit/CardDAV/ConverterTest.php2
-rw-r--r--apps/dav/tests/unit/Command/ListCalendarsTest.php2
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php22
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php2
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/RequestTest/Auth.php4
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php4
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php8
-rw-r--r--apps/dav/tests/unit/DAV/AnonymousOptionsTest.php2
-rw-r--r--apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php12
-rw-r--r--apps/dav/tests/unit/Upload/AssemblyStreamTest.php2
15 files changed, 40 insertions, 40 deletions
diff --git a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php
index ff62bdaa6d2..131339ee40e 100644
--- a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php
+++ b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php
@@ -68,10 +68,10 @@ abstract class AbstractCalDavBackend extends TestCase {
/** @var ILogger */
private $logger;
- const UNIT_TEST_USER = 'principals/users/caldav-unit-test';
- const UNIT_TEST_USER1 = 'principals/users/caldav-unit-test1';
- const UNIT_TEST_GROUP = 'principals/groups/caldav-unit-test-group';
- const UNIT_TEST_GROUP2 = 'principals/groups/caldav-unit-test-group2';
+ public const UNIT_TEST_USER = 'principals/users/caldav-unit-test';
+ public const UNIT_TEST_USER1 = 'principals/users/caldav-unit-test1';
+ public const UNIT_TEST_GROUP = 'principals/groups/caldav-unit-test-group';
+ public const UNIT_TEST_GROUP2 = 'principals/groups/caldav-unit-test-group2';
protected function setUp(): void {
parent::setUp();
diff --git a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
index 0e58c36b39d..8ea6e5257f0 100644
--- a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
+++ b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
@@ -52,7 +52,7 @@ use Test\TestCase;
* @package OCA\DAV\Tests\unit\CalDAV
*/
class PublicCalendarRootTest extends TestCase {
- const UNIT_TEST_USER = '';
+ public const UNIT_TEST_USER = '';
/** @var CalDavBackend */
private $backend;
/** @var PublicCalendarRoot */
diff --git a/apps/dav/tests/unit/CalDAV/Publishing/PublisherTest.php b/apps/dav/tests/unit/CalDAV/Publishing/PublisherTest.php
index 7a555220d85..d4abf61af1a 100644
--- a/apps/dav/tests/unit/CalDAV/Publishing/PublisherTest.php
+++ b/apps/dav/tests/unit/CalDAV/Publishing/PublisherTest.php
@@ -31,7 +31,7 @@ use Sabre\Xml\Writer;
use Test\TestCase;
class PublisherTest extends TestCase {
- const NS_CALENDARSERVER = 'http://calendarserver.org/ns/';
+ public const NS_CALENDARSERVER = 'http://calendarserver.org/ns/';
public function testSerializePublished() {
$publish = new Publisher('urltopublish', true);
diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php
index cd111c44ae4..9a22f63c1be 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php
@@ -43,7 +43,7 @@ use OCP\Mail\IMessage;
use Sabre\VObject\Component\VCalendar;
class EmailProviderTest extends AbstractNotificationProviderTest {
- const USER_EMAIL = 'frodo@hobb.it';
+ public const USER_EMAIL = 'frodo@hobb.it';
/** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
diff --git a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
index e7d2197a6ee..1768acb39e0 100644
--- a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
+++ b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
@@ -86,9 +86,9 @@ class CardDavBackendTest extends TestCase {
/** @var string */
private $dbCardsPropertiesTable = 'cards_properties';
- const UNIT_TEST_USER = 'principals/users/carddav-unit-test';
- const UNIT_TEST_USER1 = 'principals/users/carddav-unit-test1';
- const UNIT_TEST_GROUP = 'principals/groups/carddav-unit-test-group';
+ public const UNIT_TEST_USER = 'principals/users/carddav-unit-test';
+ public const UNIT_TEST_USER1 = 'principals/users/carddav-unit-test1';
+ public const UNIT_TEST_GROUP = 'principals/groups/carddav-unit-test-group';
private $vcardTest0 = 'BEGIN:VCARD'.PHP_EOL.
'VERSION:3.0'.PHP_EOL.
diff --git a/apps/dav/tests/unit/CardDAV/ConverterTest.php b/apps/dav/tests/unit/CardDAV/ConverterTest.php
index da2255a7172..d502783ba41 100644
--- a/apps/dav/tests/unit/CardDAV/ConverterTest.php
+++ b/apps/dav/tests/unit/CardDAV/ConverterTest.php
@@ -34,7 +34,7 @@ use OCP\IUser;
use PHPUnit_Framework_MockObject_MockObject;
use Test\TestCase;
-class ConverterTest extends TestCase {
+class ConverterTest extends TestCase {
/** @var AccountManager | PHPUnit_Framework_MockObject_MockObject */
private $accountManager;
diff --git a/apps/dav/tests/unit/Command/ListCalendarsTest.php b/apps/dav/tests/unit/Command/ListCalendarsTest.php
index 8960a9d7721..ab3721e80b9 100644
--- a/apps/dav/tests/unit/Command/ListCalendarsTest.php
+++ b/apps/dav/tests/unit/Command/ListCalendarsTest.php
@@ -48,7 +48,7 @@ class ListCalendarsTest extends TestCase {
/** @var ListCalendars */
private $command;
- const USERNAME = 'username';
+ public const USERNAME = 'username';
protected function setUp(): void {
parent::setUp();
diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
index 2b8d145059f..9ce2837332f 100644
--- a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
@@ -56,17 +56,17 @@ use Test\TestCase;
* See the COPYING-README file.
*/
class FilesPluginTest extends TestCase {
- const GETETAG_PROPERTYNAME = FilesPlugin::GETETAG_PROPERTYNAME;
- const FILEID_PROPERTYNAME = FilesPlugin::FILEID_PROPERTYNAME;
- const INTERNAL_FILEID_PROPERTYNAME = FilesPlugin::INTERNAL_FILEID_PROPERTYNAME;
- const SIZE_PROPERTYNAME = FilesPlugin::SIZE_PROPERTYNAME;
- const PERMISSIONS_PROPERTYNAME = FilesPlugin::PERMISSIONS_PROPERTYNAME;
- const LASTMODIFIED_PROPERTYNAME = FilesPlugin::LASTMODIFIED_PROPERTYNAME;
- const DOWNLOADURL_PROPERTYNAME = FilesPlugin::DOWNLOADURL_PROPERTYNAME;
- const OWNER_ID_PROPERTYNAME = FilesPlugin::OWNER_ID_PROPERTYNAME;
- const OWNER_DISPLAY_NAME_PROPERTYNAME = FilesPlugin::OWNER_DISPLAY_NAME_PROPERTYNAME;
- const DATA_FINGERPRINT_PROPERTYNAME = FilesPlugin::DATA_FINGERPRINT_PROPERTYNAME;
- const HAS_PREVIEW_PROPERTYNAME = FilesPlugin::HAS_PREVIEW_PROPERTYNAME;
+ public const GETETAG_PROPERTYNAME = FilesPlugin::GETETAG_PROPERTYNAME;
+ public const FILEID_PROPERTYNAME = FilesPlugin::FILEID_PROPERTYNAME;
+ public const INTERNAL_FILEID_PROPERTYNAME = FilesPlugin::INTERNAL_FILEID_PROPERTYNAME;
+ public const SIZE_PROPERTYNAME = FilesPlugin::SIZE_PROPERTYNAME;
+ public const PERMISSIONS_PROPERTYNAME = FilesPlugin::PERMISSIONS_PROPERTYNAME;
+ public const LASTMODIFIED_PROPERTYNAME = FilesPlugin::LASTMODIFIED_PROPERTYNAME;
+ public const DOWNLOADURL_PROPERTYNAME = FilesPlugin::DOWNLOADURL_PROPERTYNAME;
+ public const OWNER_ID_PROPERTYNAME = FilesPlugin::OWNER_ID_PROPERTYNAME;
+ public const OWNER_DISPLAY_NAME_PROPERTYNAME = FilesPlugin::OWNER_DISPLAY_NAME_PROPERTYNAME;
+ public const DATA_FINGERPRINT_PROPERTYNAME = FilesPlugin::DATA_FINGERPRINT_PROPERTYNAME;
+ public const HAS_PREVIEW_PROPERTYNAME = FilesPlugin::HAS_PREVIEW_PROPERTYNAME;
/**
* @var \Sabre\DAV\Server | \PHPUnit_Framework_MockObject_MockObject
diff --git a/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php b/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php
index c6d0a6a340f..188a39c89af 100644
--- a/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php
@@ -198,7 +198,7 @@ class ObjectTreeTest extends \Test\TestCase {
unset($_SERVER['HTTP_OC_CHUNKED']);
}
- function nodeForPathProvider() {
+ public function nodeForPathProvider() {
return [
// regular file
[
diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/Auth.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/Auth.php
index 8dd73e98bd7..a703b417e32 100644
--- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/Auth.php
+++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/Auth.php
@@ -78,7 +78,7 @@ class Auth implements BackendInterface {
* @param ResponseInterface $response
* @return array
*/
- function check(RequestInterface $request, ResponseInterface $response) {
+ public function check(RequestInterface $request, ResponseInterface $response) {
$userSession = \OC::$server->getUserSession();
$result = $userSession->login($this->user, $this->password);
if ($result) {
@@ -113,7 +113,7 @@ class Auth implements BackendInterface {
* @param ResponseInterface $response
* @return void
*/
- function challenge(RequestInterface $request, ResponseInterface $response) {
+ public function challenge(RequestInterface $request, ResponseInterface $response) {
// TODO: Implement challenge() method.
}
}
diff --git a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
index dd1cc70046d..153bc0cd93b 100644
--- a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
@@ -40,7 +40,7 @@ use OCP\Share\IShare;
use Sabre\DAV\Tree;
class SharesPluginTest extends \Test\TestCase {
- const SHARETYPES_PROPERTYNAME = \OCA\DAV\Connector\Sabre\SharesPlugin::SHARETYPES_PROPERTYNAME;
+ public const SHARETYPES_PROPERTYNAME = \OCA\DAV\Connector\Sabre\SharesPlugin::SHARETYPES_PROPERTYNAME;
/**
* @var \Sabre\DAV\Server
@@ -267,7 +267,7 @@ class SharesPluginTest extends \Test\TestCase {
$this->assertEquals($shareTypes, $result[200][self::SHARETYPES_PROPERTYNAME]->getShareTypes());
}
- function sharesGetPropertiesDataProvider() {
+ public function sharesGetPropertiesDataProvider() {
return [
[[]],
[[\OCP\Share::SHARE_TYPE_USER]],
diff --git a/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php
index 0cfa9c5229c..210e732438c 100644
--- a/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php
@@ -41,9 +41,9 @@ use Sabre\DAV\Tree;
* See the COPYING-README file.
*/
class TagsPluginTest extends \Test\TestCase {
- const TAGS_PROPERTYNAME = \OCA\DAV\Connector\Sabre\TagsPlugin::TAGS_PROPERTYNAME;
- const FAVORITE_PROPERTYNAME = \OCA\DAV\Connector\Sabre\TagsPlugin::FAVORITE_PROPERTYNAME;
- const TAG_FAVORITE = \OCA\DAV\Connector\Sabre\TagsPlugin::TAG_FAVORITE;
+ public const TAGS_PROPERTYNAME = \OCA\DAV\Connector\Sabre\TagsPlugin::TAGS_PROPERTYNAME;
+ public const FAVORITE_PROPERTYNAME = \OCA\DAV\Connector\Sabre\TagsPlugin::FAVORITE_PROPERTYNAME;
+ public const TAG_FAVORITE = \OCA\DAV\Connector\Sabre\TagsPlugin::TAG_FAVORITE;
/**
* @var \Sabre\DAV\Server
@@ -211,7 +211,7 @@ class TagsPluginTest extends \Test\TestCase {
$this->assertEquals($expectedProperties, $result);
}
- function tagsGetPropertiesDataProvider() {
+ public function tagsGetPropertiesDataProvider() {
return [
// request both, receive both
[
diff --git a/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php b/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php
index cd7f4c24340..6aabb4845fe 100644
--- a/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php
+++ b/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php
@@ -87,6 +87,6 @@ class SapiMock extends Sapi {
*
* @return void
*/
- static function sendResponse(ResponseInterface $response) {
+ public static function sendResponse(ResponseInterface $response) {
}
}
diff --git a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php
index dc47c20f345..97e140a0ab7 100644
--- a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php
+++ b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php
@@ -43,12 +43,12 @@ use Sabre\HTTP\RequestInterface;
use Sabre\HTTP\ResponseInterface;
class SystemTagPluginTest extends \Test\TestCase {
- const ID_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::ID_PROPERTYNAME;
- const DISPLAYNAME_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::DISPLAYNAME_PROPERTYNAME;
- const USERVISIBLE_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::USERVISIBLE_PROPERTYNAME;
- const USERASSIGNABLE_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::USERASSIGNABLE_PROPERTYNAME;
- const CANASSIGN_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::CANASSIGN_PROPERTYNAME;
- const GROUPS_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::GROUPS_PROPERTYNAME;
+ public const ID_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::ID_PROPERTYNAME;
+ public const DISPLAYNAME_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::DISPLAYNAME_PROPERTYNAME;
+ public const USERVISIBLE_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::USERVISIBLE_PROPERTYNAME;
+ public const USERASSIGNABLE_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::USERASSIGNABLE_PROPERTYNAME;
+ public const CANASSIGN_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::CANASSIGN_PROPERTYNAME;
+ public const GROUPS_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::GROUPS_PROPERTYNAME;
/**
* @var \Sabre\DAV\Server
diff --git a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php
index f7b34315106..d8ba21c47f9 100644
--- a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php
+++ b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php
@@ -72,7 +72,7 @@ class AssemblyStreamTest extends \Test\TestCase {
$this->assertEquals(substr($expected, $offset), $content);
}
- function providesNodes() {
+ public function providesNodes() {
$data8k = $this->makeData(8192);
$dataLess8k = $this->makeData(8191);